4 Replies Latest reply on Jul 29, 2009 10:54 AM by margotmedia

    EAR file with Utility Module

    margotmedia

      I have an application with a single MDB .jar file and 3 Utility Module .jar files. The utility projects are set up to appear in the EAR under the /lib directory. The first time the EAR file is deployed to the server, the /lib directory is populated correctly. However, if I change my source code and republish to the server, the /lib directory is not present! If I remove the EAR file from the server, then re-add it, the /lib directory is created properly.

      The first time, it looks like this:

      MyEar.ear
       |- /lib
       | |- Utility1.jar
       | |- Utility2.jar
       | |- Utility3.jar
       |- /META-INF
       | |- MANIFEST.MF
       |- MyMDB.jar
      


      If I change the code in MyMDB.jar, the EAR file is generated like:
      MyEar.ear
       |- /META-INF
       | |- MANIFEST.MF
       |- MyMDB.jar
      


      with the obvious class path problems by not having the utility jar files present. I am using a fresh install of Eclipse 3.5 and JBoss Tools 3.1.0 M2. Has anyone else seen this problem?

        • 1. Re: EAR file with Utility Module
          maxandersen

          Please report in jira with steps to how to reproduce (i.e. the above description is not enough since you don't say what kind of project it is, how you created it and how you are deploying it...)

          • 2. Re: EAR file with Utility Module
            rob.stryker

            Are you including already bundled jar files directly in your ear project or are you setting them up as separate utility projects?

            • 3. Re: EAR file with Utility Module
              sanches

              Have a look at https://jira.jboss.org/jira/browse/JBDS-804
              It's related to issues with Maven Integration (on M3)
              May be you'll face these problems too.

              • 4. Re: EAR file with Utility Module
                margotmedia

                @Max:
                Created jira report at https://jira.jboss.org/jira/browse/JBIDE-4676.

                @Rob:
                Each utility project is a separate Eclipse project; MyMDB and MyEar are a separate Eclipse projects as well. Each utility project is set to go into the "lib" directory in the EAR configuration.

                @Sanches:
                I'm not using maven, so I didn't have any of the project setup (facet installation) issues, but the /lib directory not being populated sounds exactly the same :P

                While I was walking through the steps to reproduce the issue, I noticed that different behavior was exhibited depending on the server type I was using. If I used the "JBoss v5.0" server (under the "JBoss" group), it build a compressed .ear with the /lib directory missing. If I used the "JBoss AS 5.1" server (under the "JBoss Community" group), then it build an exploded EAR with the Utility1.jar under the root. I am not too familiar with exploded deployments, but I would expect the Utility1.jar file to appear under the MyEar.ear/lib directory. Does that sound correct?

                Thanks for the help!