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

Filtering issue: wrong replacement of properties by values from MavenProject object

    XMLWordPrintableJSON

Details

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

    Description

      When the filter option is enabled in the war plugin, the plugin searches in the affected files for the pattern @...@ and ${...}. If such a pattern is found, the plugin tries to replace the found value. Therefore the ReflectionValueExtractor is used which removes the first part before the dot of the given value; e.g. "node.version" becomes "version". Then the ReflectionValueExtractor tries to find a get- or is-method in the given object (a MavenProject object).
      That means: if the 2nd part of the ${}-property can be found as getter in the MavenProject class, the plugin always uses the maven plugin values.

      The value extractor should only remove the 1st part from the property if the property begins with "project.".

      There is a similar bug report for the resource plugin (date june 2006!!!) which is not yet assigned (title: Filtering ${foo.file} evaluates to in full path to pom.xml).

      Attachments

        1. MWAR-133-maven-war-plugin.patch
          0.6 kB
          Matthew Beermann

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              twinter Thomas Winterschlade
              Votes:
              11 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: