Is there a JBOSS dependency on maven that includes all JBOSS runtimes?

I have a maven application that will be deployed to JBOSS 5.1 as a war. I want to know how to do this so that Maven can use JBOSS 5.1 jars (i.e. all banks in the / lib shared folder and any other resources available to JBOSS at run time) at compile time, but not link them to the war file.

I thought I could just include some kind of JBOSS dependency with the scope provided to do this, but I cannot find such a dependency. I did a good search and cannot find such a dependency. There are many links to the central JBOSS repository and pulling dependencies from there. I thought there would be only one global dependency that would include all JWASS runtimes. Is there such a thing?

+4
source share
2 answers

If you need more than the standard Java EE API, for example, JBoss packages or to solve some compatibility issues, you can use this dependency:

For JBoss / Java EE 7 APIs

<dependency> <groupId>org.jboss.spec</groupId> <artifactId>jboss-javaee-7.0</artifactId> <version>1.0.1.Final</version> <type>pom</type> <scope>provided</scope> </dependency> 

For JBoss / Java EE 6 APIs

 <dependency> <groupId>org.jboss.spec</groupId> <artifactId>jboss-javaee-6.0</artifactId> <version>3.0.2.Final</version> <type>pom</type> <scope>provided</scope> </dependency> 

For JBoss WildFly 8.2.0. Final complete runtime dependencies

 <dependency> <groupId>org.wildfly</groupId> <artifactId>wildfly-parent</artifactId> <version>8.2.0.Final</version> <type>pom</type> <scope>provided</scope> </dependency> 

Now you can use these POM files to extract the necessary dependencies.

This can be useful in remote debugging times to allow your IDE to automatically resolve banks and source files of the servers currently loading, or to display in stacktraces ... in development mode.

In the MAVEN build, you probably just need this configuration (depending on your version of JBoss): http://www.mastertheboss.com/jboss-server/wildfly-8/maven-configuration-for-java-ee-7 -projects-on-wildfly

+3
source

Given that JBoss is an EE container, adding a JavaEE dependency should suffice.

 <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency> 

The scope provided ensures that native JBoss libraries are used after the application is deployed to the server.

+2
source

All Articles