Topics:
Oracle Fusion Middleware provides a Maven plug-in and an archetype is provided for Oracle Coherence Grid Archive (GAR) projects.
Table 11-1 describes the Maven coordinates.
Table 11-1 Maven Coordinates with Coherence
artifacts | groupId | artifactId | version |
---|---|---|---|
GAR Plugin |
|
|
|
GAR Archetype |
|
|
|
Table 11-2 describes the goals supported by the Oracle Coherence plug-in.
Table 11-2 Oracle Coherence Goals
Goal | Purpose |
---|---|
generate-descriptor |
Generates the project's POF configuration file. |
package |
Packages the basic GAR assets, including library dependencies into a JAR archive. |
repackage |
Repackages the packaged JAR archive with optional metadata and GAR extension. |
You can create a new Coherence project using the Coherence Maven archetype.
After you have written your project code, you can use Maven to build the project:
To deploy your GAR to a Coherence Container in a WebLogic Server environment, you must add some additional configuration to your project's POM file.
Take these steps:
In a real application, you are likely to have not just a GAR project, but also some kind of client project that interacts with the Coherence cache established by the GAR.
Refer to Building a Real Application with Maven to see an example that includes a Coherence GAR and a web application (WAR) that interacts with it.