First add the JBoss repository to your maven pom.xml
<repositories> <repository> <id>JBoss Repository</id> <url>https://repository.jboss.org/nexus/content/groups/public/</url> </repository> </repositories>
Now simply add the BOM, a single dependency:
<dependencies> <dependency> <groupId>org.jboss.spec</groupId> <artifactId>jboss-javaee-7.0</artifactId> <version>1.0.0.Final</version> <type>pom</type> </dependency> </dependencies>
And thats it!
If your only interested the BOM for the web profile then change the artifactId to jboss-javaee-web-7.0. Likewise, if if you want the entire EE7 API then use jboss-javaee-all-7.0.
How is it different from Java EE 7 maven dependency specified at:
ReplyDeletehttps://wikis.oracle.com/display/GlassFish/Java+EE+7+Maven+Coordinates
?
I just know that these versions will be the same as those included in the WildFly release, so prefer to use them in my projects. AFAIK there were some minor changes in the jboss-javaee-6 compared to the javaee-6. Whether or not this will be the case with jboss-javaee-7 I don't know. I would certainly be interested in the answer, if you find out.
DeleteCan't tell for sure if it's the same case, but for JEE6 API, the official bundles contained classes with pruned method bodies, causing cryptic errors in some use cases, such as Arquillian tests. There's a JBoss wiki entry on the subject available at https://community.jboss.org/wiki/WhatsTheCauseOfThisExceptionJavalangClassFormatErrorAbsentCode
DeleteHere is the motivation for why JBoss hosted there own EE API, starting with Java EE6: https://community.jboss.org/blogs/donnamishelly/2011/04/29/jboss-java-ee-api-specs-project
Delete