user663724
user663724

Reputation:

Maven : Automatically incremental the version in maven

I am using Maven 2.0 As you can see from the below line , i am hardcoding the version as 1.0

Is it possible that for every build the version automatically increments .

  <copy file="D:/MyWeb/service/target/MyWeb-ws-1.0.war" tofile="C:/Softwares/apache-tomcat-6.0.33/webapps/MyWeb-ws-1.0.war" />

Please suggest , thank you very much .

Upvotes: 1

Views: 1964

Answers (1)

Raghuram
Raghuram

Reputation: 52665

You can look at using the Build Number Maven Plugin for this.

As documented in their web page,

This plugin works in one of 3 ways: with an SCM, with a sequential build number, or with a timestamp.

You can choose the one which is convenient to you.

Upvotes: 1

Related Questions