Thanks for your valuable help. This can be achived with out ANT.
My goal is to migrate my project from ANT to MAVEN and donot want to use ANT
for this Proof of concept.
Given below are steps. Hope it will help some one.
1) Load all the properties in initialize phase using POM properties plugin.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-1</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>local/global.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
2) Use POM's resource plugin with copy resource goal (process resource is
having some issue not sure)
during Validate phase.
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target/classpath</outputDirectory>
<resources>
<resource>
<directory>classpath</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
This will replace all the tokens from local/global.properties file to
classpath/*.* files.
Thanks.
--
View this message in context:
http://maven.40175.n5.nabble.com/Replacing-properties-with-Maven-tp4936132p4942457.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]