Java EE7 Maven Dependency against Glassfish 4.x snapshot builds

Since upcoming changes and new features for EE7 are not yet published to Maven Central, you can build against the snapshot builds in the java.net repository. Add this to your pom.xml to add a reference to the java.net repo:

<repositories>
<repository>
<id>snapshot-repository.java.net</id>
<name>Java.net Snapshot Repository for Maven</name>
<url>https://maven.java.net/content/repositories/snapshots/</url>
<layout>default</layout>
</repository>
</repositories>

To add dependencies against EE7 features, add a dependency to a latest Glassfish 4.0-x snapshot build which already includes early versions for some of the new EE7 features:

<dependency>
<groupId>org.glassfish.main</groupId>
<artifactId>javaee-api</artifactId>
<version>4.0-b33</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.glassfish.main</groupId>
<artifactId>javax.ejb</artifactId>
<version>4.0-b33</version>
</dependency>

One Reply to “Java EE7 Maven Dependency against Glassfish 4.x snapshot builds”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.