AnsweredAssumed Answered

Modify module.properties from pom.xml

Question asked by satheeshkumar on Nov 26, 2014
Latest reply on Dec 10, 2014 by satheeshkumar
Hi,

We have been using Alfresco 3.X version for a quite long time where we use ANT's build.xml to create an AMP package. In that we have an automated script which reads the module.properties and increments the build.number by one and update the module.properties, so each time we create a build the build.number will be incremented by one, so module.version=${major.version}.${minor.version}.${build.number} will also be incremented accordingly.
Sample build.xml script is shown below,

   

        <target name="increment-build-number">
      <property file="config/alfresco/module/alfresco/module.properties"/>
      <propertyfile file="config/alfresco/module/alfresco/module.properties">
         <entry  key="build.number" type="int" default="0" operation="+"/>
         <entry  key="module.version" type="string" operation="=" value="${major.version}.${minor.version}.${build.number}"/>
      </propertyfile>
   </target>


Now we are upgrading to Alfresco Community 5.0, where we are using Maven's pom.xml to create an AMP package.
Can some one help me how to increment the build.number as mentioned above using Maven's pom.xml.
Want I want is, I would like to create similar script in pom.xml as mentioned above(build.xml) to do the automatic increment of build.numer and module.version and update them in module.properties.
I'm pretty new to Maven, so any help would be greatly appreciated.

Outcomes