openCRX 2.0 SDK for Ant Step-by-Step Guide
This guide explains how to install and setup openCRX 2.0 SDK step-by-step.Download
First, download the installer executables from here:- opencrxSdk-2.0.0-windows-installer.exe for Windows
- opencrxSdk-2.0.0-linux-installer.bin for Linux
Set environment
Next, we have to check and set some environment variables. For this purpose open a shell (MS-DOS command window on Windows platforms):REM Windows set JAVA_HOME=c:\pgm\java\jdk1.5.0 set PATH=%JAVA_HOME%\bin;%PATH% set JRE_15=%JAVA_HOME%\jre
#!/bin/sh export JAVA_HOME=/usr/lib/jvm/jdk1.5.0 export PATH=$JAVA_HOME:$PATH export JRE_15=$JAVA_HOME/jre
Do not close the shell because we will need it in a minute.
Installation
The installer first takes you to the welcome screen.
On the next screen specify the installation directory. In this guide we will install the examples on a Windows platform in the directory c:\temp\SF\opencrxSdk-2.0.0.
Specify the JDK 1.5 home directory. You MUST specify the home directory of a full JDK 1.5 installation. A JRE installation is NOT sufficient!
In the next screen specify the home directory of Apache Ant 1.7.0.
At the end of the installation the installer executes a post-installation script. This script prepares and compiles all projects. If everything goes well your log should look like this sample output. Possible failure reasons are:
- On Windows platforms the system environment variable JAVA_HOME does not point to a valid JDK 1.5 or JDK 1.6
- During installation the JDK 1.5 home or the Apache Ant 1.7.0 home directory are not specified correctly
- 7-Zip is not installed
The README is shown during the last installation step. Read it! It says that openCRX 2.0 SDK contains three projects: core, groupware and store. All projects come with an ant build.xml accepting the following targets:
- clean: clean the project
- install-src: expand project source files
- deliverables: compile and build JARs
- distribution: compile, build JARs and distribution
- assemble: builds the assemblies
- config: display the project settings
After successful installation the directory structure should look like the screen shown below. The top-level directories are:
- core: contains the openCRX core project
- groupware: contains the groupware project
- store: contains the store project
- jre-1.5: contains the generated JARs, EARs, … for the target platform JRE 1.5
- source-archive: contains all sources in zipped format
- opt: contains third-party libraries
The projects require some additional JARs (JDBC drivers, Apache libraries) which are not distributed with the installer. However, you can download the ZIP from here and extract the content to the directory .\opencrxSdk-2.0.0 as shown below:
Now you are ready to build the projects. Let's start with the core project. Open a shell and run the following commands:
- cd to the directory .\opencrxSdk-2.0.0\core
- Run ant deliverables (compare your output with this sample output)
- Run ant assemble (compare your output with this sample output)
- cd to the directory .\opencrxSdk-2.0.0\groupware
- Run ant deliverables (compare your output with this sample output)
- Run ant assemble (compare your output with this sample output)
- cd to the directory .\opencrxSdk-2.0.0\store
- Run ant deliverables (compare your output with this sample output)
- Run ant assemble (compare your output with this sample output)
Congratulations
Congratulations! You have successfully installed and prepared the openCRX 2.0 SDK projects.
Version 42.1 last modified by superadmin on 20/08/2008 at 03:42
Comments: 0