Maven Ear Plugin
  1. Maven Ear Plugin
  2. MEAR-17

Jar files packed in the EAR file should also be added to application.xml or manifest.mf

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      While attempting to package an EAR for deployment on JBoss I have come across a (for me) major issue with the way this module works.

      The issue is that there are a lot dependency jars included by default. That by itself isn't the problem. The problem is there is no way to include it in the classpath without defining all the dependencies again in the pom.xml for the EAR.

      In an ideal world (for me) the jars would be an easy way to add the jars to the classpath since I want to include all I need in the EAR to make it as easy as possible to set up a depoyment environment.

      There are really two options for how to do that. Either the jar files are added to the generated Manifest.MF file or else there should be a simple option to include all packed jar files to the application.xml. Both should (AFAIK) work in any standard-compliant container.

      The option of putting all the jar files in APP-INF/lib only works on Weblogic.

        Issue Links

          Activity

          Hide
          Stéphane Nicoll added a comment -

          I agree with you. Personally, I would be in favor of deploying things in compliance with the Spec and Maven will allow that btw: most EJBs, WARs could have their manifest entry created at deployment time with transitive deps.

          However, I am in favor of adding this property in dev environments. Upating the manifest of Jar files is really painful and takes time.

          I know the spec, I have reminded this chapter many times on the users list.

          Do you have any suggestion?

          Show
          Stéphane Nicoll added a comment - I agree with you. Personally, I would be in favor of deploying things in compliance with the Spec and Maven will allow that btw: most EJBs, WARs could have their manifest entry created at deployment time with transitive deps. However, I am in favor of adding this property in dev environments. Upating the manifest of Jar files is really painful and takes time. I know the spec, I have reminded this chapter many times on the users list. Do you have any suggestion?
          Hide
          Stéphane Nicoll added a comment -

          Mark, any suggestion for this use case?

          Show
          Stéphane Nicoll added a comment - Mark, any suggestion for this use case?
          Hide
          Stéphane Nicoll added a comment -

          If you use dependencies you should update the manifest of the ejb modules accordingly (Class-Path). This is the way recommended by the spec.

          Show
          Stéphane Nicoll added a comment - If you use dependencies you should update the manifest of the ejb modules accordingly (Class-Path). This is the way recommended by the spec.
          Hide
          Steve Loughran added a comment -

          Sun's belief that you should patch the EJB modules is bollocks, because it doesnt take in to account signed JAR files, does it?

          On a brighter note while j2ee 1.5 spec doesnt come out and document it anywhere, there may a <library-directoy> element in the ear

          http://docs.sun.com/app/docs/doc/819-3659/6n5s6m57h?a=view

          This will point to the location of the library dir, and it appears to default to /lib if not set.

          Now, if EAR files point it at APP-INF/lib you get the same settings for weblogic as for java5..

          Of course, jboss4.x doesnt handle the 1.5 descriptor. There are some hints in its docs that it takes the APP-INF/lib dir, but I dont see it working for me.

          Show
          Steve Loughran added a comment - Sun's belief that you should patch the EJB modules is bollocks, because it doesnt take in to account signed JAR files, does it? On a brighter note while j2ee 1.5 spec doesnt come out and document it anywhere, there may a <library-directoy> element in the ear http://docs.sun.com/app/docs/doc/819-3659/6n5s6m57h?a=view This will point to the location of the library dir, and it appears to default to /lib if not set. Now, if EAR files point it at APP-INF/lib you get the same settings for weblogic as for java5.. Of course, jboss4.x doesnt handle the 1.5 descriptor. There are some hints in its docs that it takes the APP-INF/lib dir, but I dont see it working for me.
          Hide
          Stéphane Nicoll added a comment -

          No, so patching the EJB modules break signatures. That's one of the reason why I don't want to do it in the EAR plugin (but you should do so in the projeet building the EJB module)

          Thanks for the link, it's interessting but JavaEE5 specifc for now.

          Regarding APP-INF/lib it's a weblogic proprietary feature, it won't work on other app server.

          Show
          Stéphane Nicoll added a comment - No, so patching the EJB modules break signatures. That's one of the reason why I don't want to do it in the EAR plugin (but you should do so in the projeet building the EJB module) Thanks for the link, it's interessting but JavaEE5 specifc for now. Regarding APP-INF/lib it's a weblogic proprietary feature, it won't work on other app server.

            People

            • Assignee:
              Stéphane Nicoll
              Reporter:
              Kristoffer Peterhansel
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: