Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4123

still can't override properties in pom.xml with -D command line settings. regression?

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.0-alpha-2
    • Fix Version/s: None
    • Component/s: Command Line
    • Labels:
      None
    • Environment:
      windows vista

      Description

      Hello...
      The original bug ( http://jira.codehaus.org/browse/MNG-1992
      ) was marked as fixed in 2.1.0, and 3.0-alpha-1

      I used a slightliy modifed version of the test case described in http://jira.codehaus.org/browse/MNG-3417
      to understand what I thought i was seeing...

      It still seems not to work as described in the original bug.

      I tried two things...

      1) tried resource filtering (running > mvn -Dtest.property='overridden' clean verify < and catting test.xt as described in the original bug report.
      same result.

      Then I tried updating my maven resources plugin to 2.3 – running with maven 3.0-alpha-2 (see modified pom.xml, below). Stil no luck.

      2) next i tried
      mvn -e -Dtest.result=haha help:effective-pom

      the property setting given for test.result was still default.

      So it seems like there are two failure modes . one for resource filtering, and one for interpolation process that does not involve filtering..
      or maybe they have they same root cause. In any case it seems not to work still (at least on windoze).

      thanks !
      -chris

      modified pom.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <project>
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.test</groupId>
        <artifactId>test</artifactId>
        <version>1.0</version>
        <packaging>jar</packaging>
      
      
        <properties>
           <test.property>default</test.property>
           <test.include.pattern>*.txt</test.include.pattern>
        </properties>
        <profiles>
             <profile>
                  <id>test.profile</id>
                  <properties>
                     <test.property>profile</test.property>
                     <test.include.pattern>*.txt</test.include.pattern>
                  </properties>
              </profile>
        </profiles>
      
          <build>
           <pluginManagement>
              <plugins>
                            <plugin>
                                <artifactId>maven-resources-plugin</artifactId>
                                    <version>2.3</version>
                            </plugin>
      
              </plugins>
           </pluginManagement>
      
      
      
      
          <testResources>
             <testResource>
                 <directory>${basedir}/src/test/resources</directory>
                 <filtering>true</filtering>
                 <includes>
                     <include>${test.include.pattern}</include>
                 </includes>
             </testResource>
         </testResources>
         </build>
      </project>
      

        Attachments

        1. MNG-4123.zip
          0.9 kB
          Benjamin Bentmann

          Issue Links

            Activity

              People

              • Assignee:
                bentmann Benjamin Bentmann
                Reporter:
                chrisb206 chris bedford
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: