Uploaded image for project: 'Maven WAR Plugin'
  1. Maven WAR Plugin
  2. MWAR-9

WAR plugin should support minimal WARs for inclusion within an EAR

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      I noticed that when I build a WAR, I get a gigantic WEB-INF/lib with all my deps. This is fine for a default but maven should also support "skeleton" WARs which will be packaged within an EAR. We have EARs which package 3-4 WARs each and to have the deps duplicated within each WAR means we cannot have shared data (since the classes are loaded within each WAR's classloader, rather than by the parent EAR's classloader). It also means 80MB EARs!

      It seems like two things need to happen:

      1) Add a "skeleton" flag which prevents copying any dependencies to WEB-INF/lib.
      2) Instead generate a META-INF/MANIFEST.MF which has a Class-Path entry which lists the relative locations of the dependencies within the parent EAR.

      Fabrice has basically the same idea written down here. Starting with "- for a War..." : http://marc.theaimsgroup.com/?l=turbine-maven-user&m=112737860024530&w=2

      Attachments

        1. AbstractWarMojo.patch
          11 kB
          Jason Melnick

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mperham Mike Perham
              Votes:
              59 Vote for this issue
              Watchers:
              36 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: