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

Allow optional @classifier@ in <outputFileNameMapping>

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1-beta-1
    • 2.1
    • None
    • None

    Description

      I want to remove the version from the file names, but want to keep the classifier. This is not currently possible, because you cannot make characters optional in outputFileNameMapping.

      If you use this configuration:

      @{artifactId}@-@{version}@-@{classifier}@.@{extension}@
      

      then jar files without a classifier will get an extra "-" in it.
      maven-test-lib-1.0.jar becomes maven-test-lib-.jar

      We want to use a configuration like this:

      @{artifactId}@-@{version}@[-@{classifier}@].@{extension}@
      

      so that the "-classifier" is only applied if there is a classifier.
      maven-test-lib-1.0.jar should now become maven-test-lib.jar

      To fix this I need to change the regular expressions used by RegexBasedInterpolator (from plexus interpolation) in MappingUtils.java:66 but don't know how? Is it even possible?

      Attachments

        Activity

          People

            dennisl@apache.org Dennis Lundberg
            dennisl@apache.org Dennis Lundberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: