-
1. Re: How to add a JBoss module as a dependency?
john.genoese Oct 1, 2012 8:18 PM (in response to metal.carratt)Have you tried explicit inclusion of said module in a jboss-deployment-structure.xml file, and then including that file in your deployment?
Along with that, change the scope of the dependency in your POM to "provided".
-
2. Re: How to add a JBoss module as a dependency?
metal.carratt Oct 1, 2012 8:42 PM (in response to john.genoese)Hi John,
I tried WebArchive.addAsResource(new File("/META-INF/jboss-deployment-structure.xml")) using the jboss-deployment-structure.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="org.apache.ws.security"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
However it doesn't work. Did I add the file correctly (in the way you expected)?
The error I get (still) is:
java.lang.ClassNotFoundException: org.apache.ws.security.WSPasswordCallback from [Module "deployment.xxx.war:main" from Service Module Loader]
John Genoese wrote:
Have you tried explicit inclusion of said module in a jboss-deployment-structure.xml file, and then including that file in your deployment?
Along with that, change the scope of the dependency in your POM to "provided".
Thanks.
-
3. Re: How to add a JBoss module as a dependency?
john.genoese Oct 1, 2012 8:49 PM (in response to metal.carratt)1 of 1 people found this helpfulPlease make these two changes and try again.
1. change 'addAsResource' to 'addAsWebInfResource' because for WAR files, jboss-deployment-structure.xml goes under WEB-INF.
2. for completeness, add slot="main" to the <module/> entry.
-
4. Re: How to add a JBoss module as a dependency?
metal.carratt Oct 1, 2012 8:58 PM (in response to john.genoese)It's working now. Thanks for your help.
-
5. Re: How to add a JBoss module as a dependency?
john.genoese Oct 1, 2012 9:01 PM (in response to metal.carratt)You are most welcome.