0 Replies Latest reply on Aug 3, 2011 8:28 AM by Michael De Gols

    How to create custom module to share between WAR deployments

    Michael De Gols Newbie

      Hi all,


      Everything is in the title... I want to share Seam Solder library between multiple WAR.

      First I created a JBoss module in {jboss.home}\modules\org\jboss\seam\solder\main containing the jar and the following module.xml:


      <module xmlns="urn:jboss:module:1.0" name="org.jboss.seam.solder">
              <resource-root path="seamsolder.jar"/>
              <!-- Insert resources here -->
              <module name="javax.api"/>
              <module name="javax.enterprise.api"/>
              <module name="javax.inject.api"/>
              <module name="javax.persistence.api"/>
              <module name="javax.interceptor.api"/>
              <module name="javax.servlet.api"/>


      Then I added some configuration in the standalone.xml file:


      <subsystem xmlns="urn:jboss:domain:ee:1.0" >
                <module name="org.jboss.seam.solder" slot="main" />


      I deploy my WAR but I get an error:


      WELD-001408 Unsatisfied dependencies for type [Logger] with qualifiers [@Default] at injection point [[field] @Category @Inject private controller.MemberRegistration.log]


      My dependency doesn't seem to be satisfied. When the seamsolder.jar is in WEB-INF/lib everything works fine.

      I also tried to use the manifest.mf and the jboss-deployment-structure.xml but no effect.

      Can somebody tell me what I'm doing wrong ?


      Thanks in advance!