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:

  1. bind properties-maven-plugin initialize phase
  2. after plugin configuration in pom, add buildnumber-maven-plugin plugin
  3. after previous two, put buildnumber-maven-plugin plugin (which default bind initialize 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

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -