java - Read Maven SCM url value from Properties file -
my pom.xml has scm configuration follows
<scm> <url>${my.scm.url}</url> </scm>
i have property file reading using properties-maven-plugin has value of ${my.scm.url}, , using buildnumber-maven-plugin latest revision svn.
the issue buildnumber-maven-plugin throws invalid scm url error but, when replace ${my.scm.url} actual url svn repo , works perfectly.
how can achieve successful execution without having hard code scm url ?
ps: run build using : mvn clean install command
.
the problem due order plugins run. following should work:
- bind
properties-maven-plugin
initialize
phase - after plugin configuration in pom, add
buildnumber-maven-plugin
plugin - after previous two, put
buildnumber-maven-plugin
plugin (which default bindinitialize
phase).
now 3 plugins should run in correct order (you can check logs). alternatively can bind different phases ensure run in correct order, above should enough , conforms goal of initialize
phase (initialize build state, e.g. set properties or create directories).
Comments
Post a Comment