I would like to include external jar files into classpath for all configurations of jBoss7. Is there any way to do this without moving my files somewhere into jboss lib directories? Or better - is there any way to include all jar files in some external directory?
No answer actually outlines exactly what to do here so here goes.
In your jboss-deployment-structure.xml
file, which should be in webapp/WEB-INF
you need to add the module reference :
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
<deployment>
<dependencies>
<module name="javaee.api">
<imports>
<exclude path="org/apache/xml/security/**" />
</imports>
</module>
<module name="com.sun.xml.bind" slot="main" />
<module name="com.mycompany.mypackage" slot="1_0" />
<module name="com.oracle.ojdbc14" slot="main" />
</dependencies>
</deployment>
</jboss-deployment-structure>
then copy the jar file this dir :
C:\[JBoss-Home]\modules\com\mycompany\mypackage\1_0
来源:https://stackoverflow.com/questions/15361175/adding-of-external-jar-file-into-classpath-for-jboss-7