2 Replies Latest reply on Aug 22, 2011 7:03 AM by Dattaram Porob

    Defining dependency at parent level in EARs

    Dattaram Porob Newbie

      If I have a dependency that is common to all my sub-deployments within an EAR, can I define that dependency at the level of the deployment in the deployment structure xml file OR do I have to define the dependency in each and every sub-deployment within the XML ?

       

      I tried adding the dependency at the parent level but it did not work; may be I am doing something wrong.

        • 1. Re: Defining dependency at parent level in EARs
          jaikiran pai Master

          You should add it to jboss-deployment-structure.xml in .ear/META-INF.

           

           

          Dattaram Porob wrote:

           

           

          I tried adding the dependency at the parent level but it did not work; may be I am doing something wrong.

          What's not working? More details please. What does the xml look like?

          • 2. Re: Defining dependency at parent level in EARs
            Dattaram Porob Newbie

            We already have a deployment xml in the EAR/META-INF and it looks like :

             

            <jboss-deployment-structure>
            <ear-subdeployments-isolated>false</ear-subdeployments-isolated>
              <deployment>

              </deployment>
            <sub-deployment name="comp1.jar">
                <dependencies>
                  <module name="com.test.common" />
                </dependencies>
              </sub-deployment>
             
              <sub-deployment name="comp2.jar">
                <dependencies>
                  <module name="com.test.common" />
                </dependencies>
              </sub-deployment>     
            </jboss-deployment-structure>

             

             

            My question is whether adding dependency "<module name="com.test.common" />" inside "<deployment>" and removing it from the sub-deployment dependencies should make this dependency available to both sub-deployments 'comp1.jar' and 'comp2.jar' ?