The JBoss/WildFly way to configure Maven projects makes developing Java EE 7 applications with WildFly very straightforward.
Configuring a project to use the JBoss Java EE 7 Bill Of Materials (BOM) removes the difficulty of specifying what version of dependencies are required as these are already defined within the BOM.
So, to configure a WildFly project, we need to first define the BOM in the project's pom.xml file.
Once we've defined the BOM, we can easily add Maven dependencies without worrying about versions.
Simple !
Configuring a project to use the JBoss Java EE 7 Bill Of Materials (BOM) removes the difficulty of specifying what version of dependencies are required as these are already defined within the BOM.
So, to configure a WildFly project, we need to first define the BOM in the project's pom.xml file.
<properties>
<version.jboss.bom>8.0.0.Final</version.jboss.bom>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly.bom</groupId>
<artifactId>jboss-javaee-7.0-with-tools</artifactId>
<version>${version.jboss.bom}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Once we've defined the BOM, we can easily add Maven dependencies without worrying about versions.
<dependencies>
<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.2_spec</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
Simple !
Comments
Post a Comment