Did you know that Java EE 7 APIs are now published in maven ?
The complete set of coordinates are href="https://wikis.oracle.com/display/GlassFish/Java+EE+7+Maven+Coordinates">described
here. So how do you build a simple Java EE 7 maven
application ?
mvn -DarchetypeGroupId=org.codehaus.mojo.archetypes
-DarchetypeArtifactId=webapp-javaee6 -DarchetypeVersion=1.5
-DarchetypeRepository=http://repo.maven.apache.org/maven2
-DgroupId=org.glassfish -DartifactId=hello-javaee7
-Dversion=1.0-SNAPSHOT -Dpackage=org.glassfish.hellojavaee7
-Darchetype.interactive=false --batch-mode archetype:generate
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
with
<repositories>
<repository>
<id>Java EE 7</id>
<url>https://maven.java.net/content/groups/promoted/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0-b72</version>
</dependency>
</dependencies>
javaee-web-api
And now all Java EE 7 APIs so far integrated in GlassFish are
available in your application.
You can also include specific API JAR files explicitly in your
project directly. The latest APIs are available in the format:
In general, you can replace "b72" in the URL with the latest
promoted build number to get the latest artifacts. A simplified
URL for the latest set of these artifacts is in the works!
What next ? Maven archetype and href="http://wiki.netbeans.org/JavaEE7">support in NetBeans
coming soon!
Thank you very much.