setup version as a parameter

This change will allow us to version and deploy
this project in a similiar manner as python projects.

Add a ${project-version} parameter to allow passing
in version from the command line.

Example:
  mvn clean package -Dproject-version=1.2.3

Change-Id: Idda32b1cd86791d6fdcf659f8d0b695782768a76
This commit is contained in:
zaro0508 2013-06-17 22:59:14 -07:00
parent 9bacb54664
commit 1e2fdcc524
1 changed files with 9 additions and 5 deletions

14
pom.xml
View File

@ -16,6 +16,10 @@
limitations under the License.
-->
<!--
Pass in the version on manual builds (i.e. mvn clean package -Dproject-version=1.0)
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
@ -29,7 +33,7 @@
<artifactId>gearman-plugin</artifactId>
<packaging>hpi</packaging>
<version>0.0.1-SNAPSHOT</version>
<version>${project-version}</version>
<name>Gearman Plugin</name>
<description>Integrates Gearman application framework with Jenkins</description>
@ -52,8 +56,8 @@
</developers>
<scm>
<connection>scm:git:git://github.com/openstack-infra/gearman-plugin.git</connection>
<developerConnection>scm:git:git@github.com:openstack-infra/gearman-plugin.git</developerConnection>
<connection>scm:git:ssh://github.com/openstack-infra/gearman-plugin.git</connection>
<developerConnection>scm:git:ssh://git@github.com/openstack-infra/gearman-plugin.git</developerConnection>
<url>https://github.com/openstack-infra/gearman-plugin</url>
</scm>
@ -77,8 +81,8 @@
<distributionManagement>
<repository>
<id>java.net-m2-repository</id>
<url>http://maven.jenkins-ci.org/content/repositories/releases/</url>
<id>maven.jenkins-ci.org</id>
<url>http://maven.jenkins-ci.org:8081/content/repositories/releases/</url>
</repository>
<site>
<id>github-project-site</id>