Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Java EE 7 Maven Repository Coordinates

DZone's Guide to

Java EE 7 Maven Repository Coordinates

· Java Zone
Free Resource

Build vs Buy a Data Quality Solution: Which is Best for You? Gain insights on a hybrid approach. Download white paper now!

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.

Build vs Buy a Data Quality Solution: Which is Best for You? Maintaining high quality data is essential for operational efficiency, meaningful analytics and good long-term customer relationships. But, when dealing with multiple sources of data, data quality becomes complex, so you need to know when you should build a custom data quality tools effort over canned solutions. Download our whitepaper for more insights into a hybrid approach.

Topics:

Published at DZone with permission of Reza Rahman, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}