[ 
http://jira.codehaus.org/browse/MNG-3542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brett Porter updated MNG-3542:
------------------------------

    Fix Version/s: 2.0.x

> Filtering test resources replaces the wrong value
> -------------------------------------------------
>
>                 Key: MNG-3542
>                 URL: http://jira.codehaus.org/browse/MNG-3542
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>         Environment: Windows XP and Linux
> Tried with Maven 2.0.7 upwards
> Java 1.5
>            Reporter: Robert Bracewell
>             Fix For: 2.0.x
>
>
> Noticed an oddity with filtering in that it is replacing the wrong properties 
> under certain conditions. The key thing to note in below mockup is the url 
> property in pom.xml
> Contents of pom.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd";>
>       <modelVersion>4.0.0</modelVersion>
>       <url>http://THIS_IS_A_URL_TO_HIGHLIGHT_THE_BUG</url>
>       <groupId>com.maven.bugs</groupId>
>       <artifactId>bug1</artifactId>
>       <version>1</version>
>       <packaging>jar</packaging>
>       <name>Maven Bug 1</name>
>       <build>
>               <testResources>
>                       <testResource>
>       
> <directory>src/test/resources</directory>
>                               <filtering>true</filtering>
>                       </testResource>
>               </testResources>
>       </build>
> </project>
> In the src/test/resources directory is a file that contains:
> <?xml version="1.0" encoding="UTF-8"?>
> <filtering>
>       <property name="url">
>               <value>${test.url}</value>
>       </property>
> </filtering>
> When running mvn clean process-test-resources the file generated in 
> target/test-classes now contains:
> <?xml version="1.0" encoding="UTF-8"?>
> <filtering>
>       <property name="url">
>               <value>http://THIS_IS_A_URL_TO_HIGHLIGHT_THE_BUG</value>
>       </property>
> </filtering>
> This is not what I expect as I don't have a property for test.url defined

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

        

Reply via email to