You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tom Purcell <tp...@chariotsolutions.com> on 2008/05/27 19:26:57 UTC
Surefire Property Filtering
Hello
We want to be able to filter properties for our unit tests. For instance
a developer's build will run against our continuous integration build. We
have set up maven profiles and property filter files that work fine for the
actually build but the property filtering does not happen when the surefire
plugin runs the tests. Here's the build section of our pom:
<build>
<filters>
<filter>src/main/filters/${wile-filter-properties}</filter>
<filter>src/test/filters/${wile-filter-properties}</filter>
</filters>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<includes>
<include>**/*</include>
</includes>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
</plugin>
</plugins>
</build>
Where did I go wrong?
Thanks
Tom
--
View this message in context: http://www.nabble.com/Surefire-Property-Filtering-tp17495752p17495752.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Surefire Property Filtering
Posted by Tom Purcell <tp...@chariotsolutions.com>.
Never mind,
This was my bad The file I was filtering looked like:
jdbc:oracle:thin:@"${wile.asset.jdbc.hostname}":"${wile.asset.jdbc.port}":"${wile.asset.jdbc.sid}"
Notice the quotes. Removed them and it worked. Arghh!
Thanks
Tom
Tom Purcell wrote:
>
> Hello
> We want to be able to filter properties for our unit tests. For
> instance a developer's build will run against our continuous integration
> build. We have set up maven profiles and property filter files that work
> fine for the actually build but the property filtering does not happen
> when the surefire plugin runs the tests. Here's the build section of our
> pom:
>
> <build>
> <filters>
> <filter>src/main/filters/${wile-filter-properties}</filter>
> <filter>src/test/filters/${wile-filter-properties}</filter>
> </filters>
> <resources>
> <resource>
> <directory>src/main/resources</directory>
> <includes>
> <include>**/*</include>
> </includes>
> <filtering>true</filtering>
> </resource>
> </resources>
> <testResources>
> <testResource>
> <directory>src/test/resources</directory>
> <includes>
> <include>**/*</include>
> </includes>
> <filtering>true</filtering>
> </testResource>
> </testResources>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.4.2</version>
> <configuration>
>
> <redirectTestOutputToFile>true</redirectTestOutputToFile>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> Where did I go wrong?
>
> Thanks
> Tom
>
>
--
View this message in context: http://www.nabble.com/Surefire-Property-Filtering-tp17495752p17514548.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org