Uploaded image for project: 'Maven Resources Plugin'
  1. Maven Resources Plugin
  2. MRESOURCES-39

Filtering fails for command line properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.2
    • 2.3
    • None
    • None
    • maven-2.0.4 and maven-2.0.5
      Mac OS X

    Description

      When passing a property on the command line to maven using -D it does not properly override values passed to filters.

      I have attached a sample project that defines a property in the pom.xml called 'filtered' This property is used as a filter in the filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties file and tests to ensure the filters match.

      The tests pass when run as

      mvn test

      BUT if I run as

      mvn -Dfiltered=from-cmd-line teset

      They fail.

      I have also included the antrun plugin print its perspective on the value of the property.

      Attachments

        1. filtering-bug.tar
          20 kB
          Matt Brozowski
        2. maven-resources-plugin-prop-filtering-r630241.patch
          2 kB
          Paul Gier

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              brozow Matt Brozowski
              Votes:
              8 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: