One of the requirement in my project was to create an entry of last SCM Revision number in web
application property file every time a release build is done. So that we can show this while user logged in as
support and also add this in logging for tracking purpose. We achieved the same using
Add svn revision number maven plugin in your project plugin Management section of pom (in case of parent child maven modules add this in parent pom file)
svn-revision-number-maven-plugin
.Add svn revision number maven plugin in your project plugin Management section of pom (in case of parent child maven modules add this in parent pom file)
POM File Svn Revision Number Maven Plugin Configuration
POM.xml
In case of parent child relation add following in the child project POM
Child Project Pom.xml
Web Project Property File
build.properties
Final result will be some thing like this
result.properties
3 Comments
hello, I am facing problem using the code, my project having 4 modules, my question is where to store .properties file..because..where should its position
ReplyDeleteI tried below way to store properties file in one of the child module.but not worked for me..thanks in advance
ReplyDelete${basedir}/src/main/resources
build.properties
true
Its the same place where you should be defining property file..
DeleteIs your pom file includes property files to be updated, in resource section. If not please add them and try again.
Post a Comment