Go to primary content
Oracle® Retail POS Suite Implementation Guide, Volume 2 – Extension Solutions
Release 14.1
E54476-02
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

2 Development Environments

This chapter describes how to set up development environments.

Back Office and Central Office Development Environment

This chapter describes how to set up a single-user development environment for Oracle Retail Back Office or Central Office. The setup enumerates the files, tools, and resources necessary to build and run the Back Office or Central Office application.

When you complete the steps in this chapter, you will have a local development workspace with the ability to build the application, and an application server installation to which you can deploy the Back Office or Central Office application.

This chapter assumes that you are using WebLogic Application Server and Oracle database; together, they form the officially supported platform for the current release of Back Office or Central Office.

Your development environment may use different tools, and you may develop variations on this procedure. Specific property file settings, in particular, may need to be modified in your environment.

For more information about product versions, see the Oracle Retail Back Office Installation Guide or Oracle Retail Central Office Installation Guide.

Using the Apache Ant Build Tool

Oracle Retail uses the Apache Ant build tool to compile and build executable products from source. Ant uses build information defined in various build.xml files, which in turn read from properties files. Each top-level directory in the product's source contains a build.xml file that specifies a variety of targets, or build tasks, for use by Ant.

Since each code module depends on other modules, the top-level build directory has a build.xml file which contains targets designed to build the entire system. You can build modules individually if you built them in the correct dependency order.

Properties files (such as build.properties) contain values that are used by Ant when it processes tasks. Individual properties can exist in multiple files. The first setting processed by Ant is the one that is used; properties are like constants which cannot be changed once set.

If your system does not already have Ant, you can use the version shipped with Back Office or Central Office located at:

<source_directory>\thirdparty\apache\ant

Note:

Make sure that the Ant bin directory is included in your workstation's PATH.

Prerequisites for the Development Environment

The following software resources must be installed and configured before you set up the Back Office or Central Office development environment as described in the next section. Where a software version is specified, use only the specified version.

  • The Back Office or Central Office source code, on a local (or network) hard disk. See Chapter 1 for details on how to extract the code.

  • A database server and database. You should have access to the database server; you need its connection URL, user name and password. Depending on your organization's preferences, you may need to install the database server yourself, get a qualified database administrator to install it for you, or you may access a database server installed on another machine. The instructions in this chapter work for a local or remote database.

  • JDK 7 or later in the Java 7 code line.

    Downloads and instructions are available at the following web site:

    http://www.oracle.com/technetwork/java/javase/downloads/index.html
    

    The JAVA_HOME environment variable needs to be set in your operating system and the %JAVA_HOME%\bin directory needs to be added to the path.

Install Weblogic Application Server

Install Weblogic Application Server (WL) under any directory you choose. Follow the instructions that come with the Application Server product. This chapter refers to this directory as <WL_ROOT>.

Build the Back Office or Central Office Application

Do the following to build the Back Office or Central Office application:

  1. CD to the Back Office or Central Office build directory.

  2. Edit setenv.sh (or setenv.bat on Windows). Make sure that ANT_HOME is set correctly for your system.

  3. Execute setenv.sh (or setenv.bat).

  4. Run the following, where <application> is either backoffice or centraloffice:

    ant –Denv=<application> clean.build.assemble
    

    This command will take several minutes to execute. If successful, it puts the J2EE-compatible .ear file in applications/<application>/assemble/assemble.working.dir/<application>.ear, where <application> is either backoffice or centraloffice.

  5. Obtain the installer in install/dist/<application>-<release_number>.zip, where <application> is either ORBO or ORCO.

  6. Run the installer. See the Oracle Retail Back Office Installation Guide or the Oracle Retail Central Office Installation Guide for more information.

Point-of-Service Development Environment

A development environment for Point-of-Service includes all files, tools and resources necessary to build and run the Point-of-Service application. While development environments may vary depending on the choice of IDE, database, and version control system, configuration of the development environment involves some common steps. This document addresses components that various development environments have in common.

Preparation

The following software resources must be installed and configured before the Point-of-Service development environment can be set up. Ensure that the following are in place:

Version control system

The Point-of-Service source code must be available from a source control system.

OracleRetailStore database

The OracleRetailStore database should be installed.

Eclipse version 3.0 or another IDE

If installing Eclipse, downloads and instructions are available from ://www.eclipse.org/downloads/http.

JDK 7 or later in the Java 7 code line

Downloads and instructions are available at the following web site:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Setup

Setting up the development environment requires installing the Point-of-Service application, populating the database, creating a sandbox, configuring the IDE, and configuring the version control system.

Install Point-of-Service

Install Point-of-Service using the installation script. While running the Point-of-Service installation script, accept the default options even when nothing is selected, except for the options discussed in the following table.

Table 2-1 lists some Point-of-Service installation options.

Table 2-1 Point-of-Service Installation Options

Option Instruction

Tier Type

Choose the Tier Type from the following options.

Client and Store Server—Choose both of these options to run client and server components on the same machine in separate JVMs.

Database Information

Specify the database type and its location.

JRE Location

Location where the JRE is installed.


Build the Database

Open a command prompt in the Point-of-Service installer directory and use the following command-lines:

  • To reset the store database: install.cmd ant install-database

  • To reset the scratchpad database: install.cmd ant install-scratchpad

  • To reset both: install.cmd ant install-database install-scratchpad

The install-database command uses the settings in the ant.install.properties file, so the dataset specified by the input.install.database property is loaded. The values can be:

  • no – no action taken

  • schema – only install the schema, no data

  • minimum – schema and minimum required data

  • sample – schema, minimum, and sample data


Note:

If the same installer directory is used for installing the Point-of-Service client, the ant.install.properties file is overwritten with the new settings. Then the ant.install.properties file cannot be used for building the database.

To reset the scratchpad database, the ant.install.properties file needs to have the scratchpad database information as well as input.install.scratchpad.database set to true.

Create a Sandbox

If you plan to retrieve all the source code with the version control system, create a local sandbox with only one directory such as the following:

C:\mySandbox\

Configure the Version Control System

Each file from the source code repository should be retrieved to the proper location in your sandbox. To do this, set the workfile location of the root of each of the product components displayed in the version control system. Each workfile location should be set to the local sandbox. For example, if your sandbox is named C:\mySandbox, the root of the product components should point to C:\mySandbox.

Run Point-of-Service

To verify the setup, run the Point-of-Service application using the following steps:

  1. Start the OracleRetailStore database.

  2. Build the project.

  3. Run Point-of-Service from the IDE.