Tuesday, 15 March 2011

How do I use the Google Maven replacer plugin to replace the string "${version}"? -



How do I use the Google Maven replacer plugin to replace the string "${version}"? -

i’m using 1.5.3 version of maven replacer plugin. want replace string “${version}” in properties file, contains line

application.version=${version}

with actual <version> element defined in pom. i’m trying this, without success:

<execution> <id>replace-application-version</id> <phase>compile</phase> <configuration> <file>${project.build.outputdirectory}/application.properties</file> <replacements> <replacement> <token>\${version}</token> <value>${version}</value> </replacement> </replacements> </configuration> <goals> <goal>replace</goal> </goals> </execution>

i don’t know how escape string “${version}” in “<token>” block. help appreciated.

maven plugins replace maven-3

No comments:

Post a Comment