Maven: The Complete Reference - Chapter 16. Appendix: Sun Specification Alternatives |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The Apache Geronimo project maintains implementations of various
enterprise Java specifications. Table 16.1, “Alternate Spec Implementations Artifacts” lists the
artifactId and artifact version for all of the specifications
implemented by the Geronimo project. To use one of these dependencies,
use a groupId of NoteAll artifacts in Table 16.1, “Alternate Spec Implementations Artifacts”, have a groupId of
Table 16.1. Alternate Spec Implementations Artifacts
NoteThe version numbers in the Artifact Version column may be out of date by the time you read this book. To check on the version number, visit http://repo1.maven.org/maven2/org/apache/geronimo/specs/ in a web browser, and click on the artifactId you want to add. Choose the highest version of the spec you want to depend upon. To illustrate how one would use Table 16.1, “Alternate Spec Implementations Artifacts”, if we wanted to write some code in our project which interacted with the JTA 1.0.1B specification, we would need to add the following dependency to our project: Adding JTA 1.0.1B to a Maven Project. <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-jta_1.0.1B_spec</artifactId> <version>1.1.1</version> </dependency>
Notice how the version of the artifact isn’t going to line up with the version of the specification—the previous dependency configuration adds version 1.0.1B of the JTA specification using the artifact version of 1.1.1. Be aware of this when depending on the alternate Geronimo implementations, and always double check that you are using the latest artifact version number for your specifications. |