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

warSourceExcludes not working properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0
    • None
    • None
    • Win2k, Java 1.4.2_04, m2 beta1

    Description

      Note: I posted a message on Maven users list (http://www.mail-archive.com/users%40maven.apache.org/msg24088.html), but I got no answer so I post this issue, which in turn may or not be a bug... (sorry if it's not)

      I experienced a strange behaviour with the 'warSourceExcludes' property. When I grab some Web projects from the CVS of my company, I usually get all the WEB-INF/lib Jars that the developers put in the CVS:

      • With Maven 1, I use the 'maven.war.src.excludes' property to exclude those Jars ('maven.war.src.excludes=*/lib/.*'), and it works well: the Jars packaged in the War are only the ones defined in the pom.
      • With m2, I tried to use the 'warSourceExcludes' property, which seemed to me to be the equivalent property. However, when the War is generated, there is no jar in the WEB-INF/lib folder. This works as if the plugin is excluding files after having copied the needed dependencies in the WEB-INF/lib folder (whereas in the Maven 1 version, it was excluding them before).

      Looking at the code of the m2 plugin, the value of 'warSourceExcludes' is used in method #getExcludes which is actually called in #performPackaging method. If this property is to work the same way as in m1, its value should be used in #copyResources method, before copying the Jar dependencies in WEB-INF/lib.

      What do you guys think of that? Am I right or am I missing something?

      Attachments

        1. MNG-1038-maven-war-plugin.patch
          0.8 kB
          Edwin Punzalan
        2. MNG-1038-maven-war-plugin.patch
          0.6 kB
          Edwin Punzalan

        Issue Links

          Activity

            People

              elpunzalan Edwin Punzalan
              fabemn Fabrice Bellingard
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: