To build the Oracle Coherence Incubator you need to have the following software installed:
Java SE Development Kit 7 and 8.
Available from: Oracle Java SE Downloads
Apache Maven Version 3.2.5+
Available here: Apache Maven Downloads
The source code.
Additionally you should set your Maven Options as follows:
MAVEN_OPTS="-Djava.net.preferIPv4Stack=true"
In order to build the Coherence JVisualVM plug-in (available coherence-jvisualvm
directory)
you will need to add the following repository in your Maven settings.xml:
Lastly, you will need to configure the Maven Tool Chains ie: toolchains.xml in your ~/.m2 folder, to define the Java 7 and Java 8 platforms provided by Oracle.
For example, a ~/.m2/toolchains.xml for macOS may look like:
```xml
<toolchain>
<type>jdk</type>
<provides>
<version>1.7</version>
<vendor>oracle</vendor>
</provides>
<configuration>
<jdkHome>/Library/Java/JavaVirtualMachines/jdk1.7.0_101.jdk/Contents/Home</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>1.8</version>
<vendor>oracle</vendor>
</provides>
<configuration>
<jdkHome>/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home</jdkHome>
</configuration>
</toolchain>
</toolchains>
```
Once you have this software and have correctly configured the above Maven options, building the entire source tree is as simple as executing the following shell command (from the root of the source directory):
$ mvn clean install
Important: The fact that the Oracle Coherence Incubator depends on a commercial product,
namely Oracle Coherence
that of which is not available in a public Maven Repository, probably means that your
first build is likely to fail because of a missing dependency on coherence.jar
.
Should this problem occur and you aren't using the standard Coherence installer, you will
need to manually install the appropriate coherence.jar
and coherence-web.jar
s into your
local repository or your organization's repository.
To install the standard coherence.jar
into your local Apache Maven repository,
simply change to $COHERENCE_HOME/lib
directory and run the following command:
$ mvn install:install-file \
-DgroupId=com.oracle.coherence \
-DartifactId=coherence \
-Dversion=12.1.3-0-6 \
-Dfile=coherence.jar \
-Dpackaging=jar \
-DgeneratePom=true
To install the standard coherence-web.jar
into your local Apache Maven repository,
simply change to $COHERENCE_HOME/lib
directory and run the following command:
$ mvn install:install-file \
-DgroupId=com.oracle.coherence \
-DartifactId=coherence-web \
-Dversion=12.1.3-0-6 \
-Dfile=coherence-web.jar \
-Dpackaging=jar \
-DgeneratePom=true
The
groupId
,artifactId
andversion
properties are critically important. They must be as indicated above otherwise the Oracle Coherence Incubator won't build.
Of course the above assumes that you are installing the Coherence 12.1.3-0-6 jar
s
If you want to install one of the more recent releases, change the version
number in the command above accordingly.
Once theses are properly installed into your Apache Maven repository, you should be able to build the Oracle Coherence Incubator.