| J2EE[tm] Blueprints > Java[tm] Pet Store Administrator > Building the application and Javadocs |
We use Ant to build the source code. Ant is a Java-based build tool like make, which has been developed under the auspices of the Apache Software Foundation. A working version of Ant is provided as part of the J2EE Blueprints bundle.
|
Note: The J2EE Blueprints bundle comes with a pre-built version of the Java Pet Store Administrator. To deploy that version and avoid building the application, consult the installation instructions. |
|
Note: The Java Pet Store Administrator Javadocs are also available on the Web. Look at these if you don't want to rebuild the Javadocs. |
|
Note: These instructions use $JPS_HOME (UNIX) and %JPS_HOME% (Win32) to
denote the root directory of the J2EE Blueprints bundle. |
The source code is located in the
$JPS_HOME/src/petstoreadmin/src/ (UNIX) or
%JPS_HOME%\src\petstoreadmin\src\ (Win32).
To build the source using Ant:
UNIX: Change the current directory to
$JPS_HOME/src/petstoreadmin/src/ and run
build.sh. If the compilation succeeds,
petstoreadmin.ear will be created in the directory
$JPS_HOME/src/petstoreadmin/build/.
Win32: Change the current directory to
%JPS_HOME%\src\petstoreadmin\src\ and run
build.bat. If the compilation succeeds,
petstoreadmin.ear will be created in the directory
%JPS_HOME%\src\petstoreadmin\build\.
When deploying the built application, use the file
petstoreadmin.ear created by the build (as opposed to
pre-built one located in the root directory of the J2EE Blueprints
bundle).
To build the Javadocs using Ant, bring up a shell or command prompt. Then:
UNIX: Change the current directory to
$JPS_HOME/src/petstoreadmin/src/ and run build.sh
javadocs. If the build succeeds, a folder docs
containing the Javadocs will be created in the directory
$JPS_HOME/src/petstoreadmin/build/.
Win32: Change the current directory to
%JPS_HOME%\src\petstoreadmin\src\ and run build.bat
javadocs. If the build succeeds, a folder docs
containing the Javadocs will be created in the directory
%JPS_HOME%\src\petstoreadmin\build\.