You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "chris bedford (JIRA)" <ji...@codehaus.org> on 2009/04/02 21:46:13 UTC

[jira] Created: (MNG-4123) still can't override properties in pom.xml with -D command line settings. regression?

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

                 Key: MNG-4123
                 URL: http://jira.codehaus.org/browse/MNG-4123
             Project: Maven 2
          Issue Type: Bug
          Components: Command Line
    Affects Versions: 3.0-alpha-2
         Environment: windows vista
            Reporter: chris bedford


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>





-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-4123) still can't override properties in pom.xml with -D command line settings. regression?

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-4123.
----------------------------------

    Resolution: Cannot Reproduce

> still can't override properties in pom.xml with -D command line settings. regression?
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-4123
>                 URL: http://jira.codehaus.org/browse/MNG-4123
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.0-alpha-2
>         Environment: windows vista
>            Reporter: chris bedford
>            Assignee: Benjamin Bentmann
>         Attachments: MNG-4123.zip
>
>
> 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
> {code: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>
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4123) still can't override properties in pom.xml with -D command line settings. regression?

Posted by "Steve Holmes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=171851#action_171851 ] 

Steve Holmes commented on MNG-4123:
-----------------------------------

I copied the example POM and my output shows:

 <properties>
   <test.include.pattern>*.txt</test.include.pattern>
   <test.property>default</test.property>
 </properties>

Shouldn't the test.property show "cli"?

-Steve

> still can't override properties in pom.xml with -D command line settings. regression?
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-4123
>                 URL: http://jira.codehaus.org/browse/MNG-4123
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.0-alpha-2
>         Environment: windows vista
>            Reporter: chris bedford
>            Assignee: Benjamin Bentmann
>         Attachments: MNG-4123.zip
>
>
> 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
> {code: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>
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4123) still can't override properties in pom.xml with -D command line settings. regression?

Posted by "Steve Holmes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=171854#action_171854 ] 

Steve Holmes commented on MNG-4123:
-----------------------------------

I should mention I am using 2.1

> still can't override properties in pom.xml with -D command line settings. regression?
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-4123
>                 URL: http://jira.codehaus.org/browse/MNG-4123
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.0-alpha-2
>         Environment: windows vista
>            Reporter: chris bedford
>            Assignee: Benjamin Bentmann
>         Attachments: MNG-4123.zip
>
>
> 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
> {code: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>
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-4123) still can't override properties in pom.xml with -D command line settings. regression?

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-4123:
-----------------------------------

    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

{code: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>
{code}




  was:
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>






> still can't override properties in pom.xml with -D command line settings. regression?
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-4123
>                 URL: http://jira.codehaus.org/browse/MNG-4123
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.0-alpha-2
>         Environment: windows vista
>            Reporter: chris bedford
>
> 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
> {code: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>
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4123) still can't override properties in pom.xml with -D command line settings. regression?

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=171852#action_171852 ] 

Benjamin Bentmann commented on MNG-4123:
----------------------------------------

As said:
bq. NOTE: model properties get never overriden by system properties. However, system properties take precedence over model properties during interpolation.

The CLI directive {{-D}} defines system properties which are kept separate from the {{<properties>}} defined in the POM. The system properties are merely the preferred data source during POM interpolation or plugin configuration. {{<properties>}} defined by profiles on the other hand override the properties in the POM, because these are the same kind of property sources.

> still can't override properties in pom.xml with -D command line settings. regression?
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-4123
>                 URL: http://jira.codehaus.org/browse/MNG-4123
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.0-alpha-2
>         Environment: windows vista
>            Reporter: chris bedford
>            Assignee: Benjamin Bentmann
>         Attachments: MNG-4123.zip
>
>
> 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
> {code: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>
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-4123) still can't override properties in pom.xml with -D command line settings. regression?

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-4123.
----------------------------------

      Assignee: Benjamin Bentmann
    Resolution: Cannot Reproduce

About resource filtering: This is beyond the Maven core, so any issues with resources need to be filled against the Maven Resources Plugin.

> still can't override properties in pom.xml with -D command line settings. regression?
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-4123
>                 URL: http://jira.codehaus.org/browse/MNG-4123
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.0-alpha-2
>         Environment: windows vista
>            Reporter: chris bedford
>            Assignee: Benjamin Bentmann
>         Attachments: MNG-4123.zip
>
>
> 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
> {code: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>
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-4123) still can't override properties in pom.xml with -D command line settings. regression?

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-4123:
-----------------------------------

    Attachment:     (was: MNG-4123.zip)

> still can't override properties in pom.xml with -D command line settings. regression?
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-4123
>                 URL: http://jira.codehaus.org/browse/MNG-4123
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.0-alpha-2
>         Environment: windows vista
>            Reporter: chris bedford
>            Assignee: Benjamin Bentmann
>         Attachments: MNG-4123.zip
>
>
> 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
> {code: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>
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-4123) still can't override properties in pom.xml with -D command line settings. regression?

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-4123:
-----------------------------------

    Attachment: MNG-4123.zip

I can't reproduce the problem you mentioned in the issue title. Running "mvn help:effective-pom -D test.property=cli" on the attached project using Maven 3.0-alpha-2 outputs 
{code:xml}
<properties>
  <!--
  NOTE: model properties get never overriden by system properties.
  However, system properties take precedence over model properties
  during interpolation.
  -->
  <test.property>default</test.property>
  <test.result>cli</test.result>
</properties>
{code}

The effective value of {{test.result}} is however known to be wrong when "mvn ... -P test" is invoked instead (see MNG-3900).

> still can't override properties in pom.xml with -D command line settings. regression?
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-4123
>                 URL: http://jira.codehaus.org/browse/MNG-4123
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.0-alpha-2
>         Environment: windows vista
>            Reporter: chris bedford
>         Attachments: MNG-4123.zip
>
>
> 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
> {code: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>
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-4123) still can't override properties in pom.xml with -D command line settings. regression?

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-4123:
-----------------------------------

    Attachment: MNG-4123.zip

We might want to start with a full debug log or your build, i.e.
{noformat}
mvn help:effective-pom -D test.property=cli -X > debug.log
{noformat}


> still can't override properties in pom.xml with -D command line settings. regression?
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-4123
>                 URL: http://jira.codehaus.org/browse/MNG-4123
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.0-alpha-2
>         Environment: windows vista
>            Reporter: chris bedford
>            Assignee: Benjamin Bentmann
>         Attachments: MNG-4123.zip
>
>
> 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
> {code: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>
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Reopened: (MNG-4123) still can't override properties in pom.xml with -D command line settings. regression?

Posted by "chris bedford (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

chris bedford reopened MNG-4123:
--------------------------------


Hi, Benjamin:
thanks for your previous comments on this bug. I hope you don't mind this request to 
reopen this issue. I think reopening is warranted because at least two people have seen 
inconsistent behavior from what you reported you saw when you ran 

     "mvn help:effective-pom -D test.property=cli"

You see 
 >       <test.result>cli</test.result>

in the output.

I see:       <test.result>default</test.result>

If it helps I would be happy to package up  a vmware image that contains my complete environment 
and allows you to repro the behavior i have observed in maven 2.1 (on both windows and Linux).







I can't reproduce the problem you mentioned in the issue title. Running "mvn help:effective-pom -D test.property=cli" on the attached project using Maven 3.0-alpha-2 outputs

<properties>
  <!--
  NOTE: model properties get never overriden by system properties.
  However, system properties take precedence over model properties
  during interpolation.
  -->
  <test.property>default</test.property>
  <test.result>cli</test.result>
</properties>



> still can't override properties in pom.xml with -D command line settings. regression?
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-4123
>                 URL: http://jira.codehaus.org/browse/MNG-4123
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.0-alpha-2
>         Environment: windows vista
>            Reporter: chris bedford
>            Assignee: Benjamin Bentmann
>         Attachments: MNG-4123.zip
>
>
> 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
> {code: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>
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira