Coherence Incubator projects are shipped both as a pre-compiled jar as well as java source. The compilation and run-time of the Incubator projects only depends on a JDK version greater than 1.5 and Coherence greater than 3.5.3.
While you may use your preferred way of building the source, we have an example below showing how to build the source using Apache Ant.
- Download the current version of Apache Ant (typically ant-current-bin.zip) from here: http://www.apache.org/dist/ant/
- Uncompress the downloaded file into a suitable folder (let's call this /your/path/to/ant)
- Set an environment variable called ANT_HOME in your system environment variables.
- For *nix bash-based shells (like Apple OS X), perform the following;
- Open ~/.profile with your favorite text editor.
- Add the following to the top of the file: export ANT_HOME=/your/path/to/ant
- Edit (or define) a PATH export to be as follows:
- export PATH=$ANT_HOME/bin:$PATH
- Save your .profile and exit your editor
- Execute the following shell command (in a Terminal Window) to re-read your new profile: source ~/.profile
- From a shell prompt (in a Terminal Window) you should now be able to execute the following command (from any path) to determine the version of Ant you have just installed: ant -version
If you're using Eclipse (or another IDE) it's recommended that you upgrade it to use the latest Apache Ant release you've just installed. Here's how:
- Open Eclipse
- Open the Preference Window
- On *nix-based releases of Eclipse (including Apple OS X), choose the Eclipse > Preferences menu.
- On Windows-based releases of Eclipse, choose the Window > Preferences menu.
- Choose Ant > Runtime
- Press the "Ant Home..." button
- Choose the location of /your/path/to/ant
Below you will find an ant script that you can use to build the Incubator projects.
- Download and unzip the incubator-project-src.zip
- In the directory where you unzipped, create a directory named "dependencies"
- Copy coherence.jar from your Coherence application to the dependencies library
- Copy the below ant script to an ant file: custom-build.xml
- On the command line, run ant -f custom-build.xml
- In the newly created .build directory you will find the compiled jar
|If the Incubator project depends on another Incubator project, you will have to build that first, and copy that jar to the dependencies directory. See Home for a view of all dependencies.|
In the ant script below, the jar will be named after the project name, please rename the <project name="name of the incubator project"> to get a differently named jar.