Reputation: 13655
Sometimes you may have a third party libraries
in your project which can cause conflicts with you server-embedded jars
. Removing embedded jars from your application server lib folder
can break other deployed apps.
Is there a way to disable server-embedded jars for only one project in TomEE, JBoss, GlassFish?
Upvotes: 2
Views: 2697
Reputation: 3996
In JBoss, you can disable container managed libraries with a jboss-deployment-structure.xml descriptor in your WEB-INF directory.
<jboss-deployment-structure>
<deployment>
<!-- Exclusions allow you to prevent the server from automatically adding
some dependencies -->
<exclusions>
<!-- This will cause the JBoss container to not provide your deployed
application's log4j dependencies. This way you can use an implementation
deployed with your artifact. -->
<module name="org.apache.log4j" />
</exclusions>
</deployment>
</jboss-deployment-structure>
The documentation for class loading in JBoss AS 7 can be found here.
Upvotes: 6