Skip to content

can I include dependent jar files directly in a jboss EAP 7.3 container?

I am migrating a java ear application from weblogic to jboss. The application is an ear with the below maven dependency on antlr in the pom:


On localhost we use jetty so it gets included by the pom I guess due to the scope being test. In our test/production environments we deploy on Weblogic and I am trying to get it moved to jboss. The ear fails when deploying to jboss because weblogic includes this antlr jar automatically in the container and jboss does not. So for jboss build I have to comment out the scope line and include antlr directly in the ear file. I would like to not change the code and still have it work on both jboss and weblogic.

Is it possible to include the antlr dependency directly in jboss as a module or some other classpath setting?



Antlr is a base module so you can add it to your dependencies, jboss will make the module accessible to your application.

One way it so add the dependencies in the manifest of your jar file, in your maven build:


Alternatively you can add a jboss-deployment-structure.xml file to your application and declare the dependency there.

2 People found this is helpful