The test resources go to a different directory, so they have a
different section (testResources)
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
On Nov 21, 2007 9:09 PM, Chad Boyd <[EMAIL PROTECTED]> wrote:
> When I run the goal resources:testResources a file in src/test/
> resources is copied to target/test-classes but isn't filtered. I have
> the src/test/resources directory listed in the pom with filtered set
> to true but the ${...} properties are still in the output file. When
> I run resources:resources it filters as expected. I'm setting the
> property values in my settings.xml file under the default profile and
> have verified that they are being recognized using mvn help:effective-pom
> . Here is a simple example you can use to reproduce:
>
> pom.xml:
>
> <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>
> <groupId>testProj</groupId>
> <artifactId>testProj</artifactId>
> <version>1.0-SNAPSHOT</version>
> <name>Archetype - testProj</name>
> <url>http://maven.apache.org</url>
> <build>
> <resources>
> <resource>
> <directory>src/main/resources</directory>
> <filtering>true</filtering>
> </resource>
> <resource>
> <directory>src/test/resources</directory>
> <filtering>true</filtering>
> </resource>
> </resources>
> </build>
> </project>
>
> contents of test.properties located in src/test/resources:
> prop=${prop.value}
>
> Now run "mvn -Dprop.val=test resources:testResources" and look at the
> output file target/test-classes/test.properties. The variable $
> {prop.val} isn't replaced. Anyone have any ideas as to what might be
> going wrong?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]