Hi, 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 Is this a bug or am I expecting the wrong behaviour? Thanks, Robert
