3 Replies Latest reply on Sep 17, 2013 11:08 AM by chichasonu

    Common jars with multiple ears

    chichasonu

      I have two Ears

        MyApp1.ear

        --MyApp1.war

        --WEB-INF

         --classes

         --abc.properties

         --def.properties

        --META-INF

          --Application.xml

          --MANIFEST.MF

       

       

       

        MyApp2.ear

        --MyApp2.war

          --WEB-INF

             --classes

             --xyz.properties

             --ghi.properties

        --META-INF

          --Application.xml

          --MANIFEST.MF

       

       

       

       

      Both my ears need some common jars like

      log4j.jar

      common-beanunitls.jar

      commons-lang.jar

      commons-logging.jar

      quartz.jar

      emorphz.jar

      itext.jar

      bcmail-pro.jar

      jasper-fonts.jar

       

       

      If i pleace all the above required jars in my ear ,my ear size would grow big in size.

      Earlier i used to deploy in Jboss 4.x and JBoss 5.1 where i userd to place all the requires jars as well as application relation proerty files in $JBOSS_HOME/profile/lib/

       

       

      I am newbie to JBOSS-AS 7.1

       

       

      Could someone please help me out with this.....

       

       

      Thanks in advance..

        • 1. Re: Common jars with multiple ears
          chichasonu

          Can some one please help me resolve this...

          Thanks in Advance

          • 2. Re: Common jars with multiple ears
            lafr

            Some of the libs are provided by the server using modules. See $JBOSS_HOME/modules/...

            These are log4j.jar, common-beanunitls.jar, commons-lang.jar, but please check with your version.

             

            For the others you also can create modules or drop these jar files into the deployments folder and add a reference to these deployments in EAR's manifest files.

            The name is always deployment.<jar-file-name>.

            <ear earfile="${BIN}/${pre-stage.ear.name}" appxml="${etc.dir}/application.xml">              
            <manifest>                                                                                
            <attribute name="Dependencies" value="deployment.controller.rar, deployment.filesystem.rar"/>
            </manifest>                                                                               
            </ear>                                                                                         
            • 3. Re: Common jars with multiple ears
              chichasonu

              Thanks for the Reply....

              I will go with the first one of creating modules..

               

               

              Please let me know if the following works

               

               

               

               

              <?xml version="1.0" encoding="UTF-8"?>

               

               

              <module xmlns="urn:jboss:module:1.1" name="com.test.myownresteasy">

                  <properties>

                      <property name="jboss.api" value="private"/>

                  </properties>

               

               

                  <resources>

                      <resource-root path="activation-1.1.jar"/>

                      <resource-root path="httpcore-4.1.2.jar"/>

                      <resource-root path="jettison-1.3.1.jar"/>

                      <resource-root path="resteasy-jaxrs-2.3.2.Final.jar"/>

                      <resource-root path="scannotation-1.0.3.jar"/>

                      <resource-root path="httpclient-4.1.2.jar"/>

                      <resource-root path="jaxrs-api-2.3.2.Final.jar"/>

                      <resource-root path="jul-to-slf4j-stub-1.0.0.Final.jar"/>

                      <resource-root path="resteasy-jaxb-provider-2.3.2.Final.jar"/>

                      <resource-root path="resteasy-jettison-provider-2.3.2.Final.jar"/>

                  </resources>

               

               

              </module>

               

               

              If i place the xml file and all the required jars in a folder and place the folder in $JBOSS_HOME/Modules/MyJars

               

               

              Does it work...?

              Please let me know.....

              or do i need to add dependencies in xml or in any Manifest files