Java EE 7 Maven Repository Coordinates

For those of us doing Java EE development with Maven (which by my own account as a former consultant is pretty much all Java EE/GlassFish adopters), getting our hands on the repository location for Java EE APIs is critically important. Fortunately, Java EE APIs have long been available via Maven central, Java EE 7 is no exception. The Java EE 7 Maven Coordinates on the GlassFish wiki is an extremely handy reference for navigating the Maven Central maze.

It also helps to know that there is a relatively well established set of guidelines for naming Java EE API Maven artifacts. Generally speaking, Java EE Maven artifacts follow this pattern:

<dependency>
    <groupId>[Java EE API package name]</groupId> 
    <artifactId>[Java EE API package name]-api</artifactId>
    <version>[Java EE API version]</version>        
</dependency> 

For the most part though, this is the only Maven coordinate you should need for Java EE 7 applications:

<dependency>
    <groupId>javax</groupId> 
    <artifactId>javaee-api</artifactId>
    <version>7.0</version>        
</dependency>

If you are using just the Web Profile, you should use this instead:

<dependency>
    <groupId>javax</groupId> 
    <artifactId>javaee-web-api</artifactId>
    <version>7.0</version>        
</dependency>

That being said, for those of you that need/want them, the GlassFish wiki outlines where you can find the Maven artifacts for just Java EE concurrency, JPA 2.1, JAX-RS 2, Servlet 3.1, EL 3.0, JMS 2, JSF 2.2, EJB 3.2, JBatch, JSON-P, WebSocket and others.

It should be pretty straightforward to use - give me a shout if you need help setting up Maven.

Comments:

thanks for the marvelous posting! I seriously enjoyed reading it, you happen to be a great author.I will remember to bookmark your blog and will come back in the future. I want to encourage yourself to continue your great posts, have a nice day!

Posted by piyush on July 24, 2013 at 10:00 AM PDT #

this will be the right weblog for any individual who desires to find out about this topic. You understand so much its virtually hard to argue with you (not that I essentially would want?-HaHa). You absolutely put a new spin on a topic thats been written about for years. Very good stuff, just excellent!

Posted by guest on July 24, 2013 at 10:02 AM PDT #

Thanks indeed for the kind words and the encouragement! Since this is a community site, please do feel free to suggest Java EE/GlassFish centric topics that we should address here :-)

Posted by Reza Rahman on July 24, 2013 at 01:58 PM PDT #

i wrote a new tutorial about Java EE 7, Glassfish, Struts+Tiles and Maven:
http://www.nabisoft.com/tutorials/struts2/maven-struts-2-enterprise-application-based-on-java-ee-7-and-glassfish-4

Actually I wrote another one about 2 months ago, although i published it 2 days ago:
http://www.nabisoft.com/tutorials/glassfish/using-glassfish-3-and-java-ee-6-for-longitude-latitude-calculations-to-implement-server-side-location-based-services

maybe you would like to post the tutorials like arun gupta, alexis and others did in the past for me (i.e. see https://blogs.oracle.com/theaquarium/entry/tab_sweep_thread_safety_jsf)

Posted by nabi on August 02, 2013 at 12:08 AM PDT #

Great - I'll put it on our queue to be featured. Do keep me posted - just send me an email at reza dot rahman at oracle dot com.

Posted by Reza Rahman on August 07, 2013 at 08:00 AM PDT #

Post a Comment:
Comments are closed for this entry.