I am working on a java web application, managed by maven2. From time to time, we did some changes, and want to do new releases, of course with new version number. In the hom
Use the maven-replacer-plugin
Include the plugin in your pom.xml like this:
com.google.code.maven-replacer-plugin
replacer
(version)
prepare-package
replace
true
target/someapp/jsp/helloWorld.jsp
target/someapp/jsp/helloWorld-updated.jsp
false
$BUILD_NUMBER$
${buildNumber}
Now anywhere in the specified file that has the token$BUILD_NUMBER$ the token will get replaced.