|
@@ -76,6 +76,39 @@
|
|
|
</plugins>
|
|
|
</pluginManagement>
|
|
|
<plugins>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.codehaus.mojo</groupId>
|
|
|
+ <artifactId>build-helper-maven-plugin</artifactId>
|
|
|
+ <version>1.8</version>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <id>parse-package-version</id>
|
|
|
+ <goals>
|
|
|
+ <goal>regex-property</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <name>package-version</name>
|
|
|
+ <value>${project.version}</value>
|
|
|
+ <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
|
|
|
+ <replacement>$1.$2.$3</replacement>
|
|
|
+ <failIfNoMatch>true</failIfNoMatch>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ <execution>
|
|
|
+ <id>parse-package-release</id>
|
|
|
+ <goals>
|
|
|
+ <goal>regex-property</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <name>package-release</name>
|
|
|
+ <value>${project.version}</value>
|
|
|
+ <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-)(([0-9]+)|(SNAPSHOT)).*</regex>
|
|
|
+ <replacement>$5</replacement>
|
|
|
+ <failIfNoMatch>true</failIfNoMatch>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
<plugin>
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
@@ -119,6 +152,8 @@
|
|
|
<copyright>2012, Apache Software Foundation</copyright>
|
|
|
<group>Development</group>
|
|
|
<description>Maven Recipe: RPM Package.</description>
|
|
|
+ <release>${package-release}</release>
|
|
|
+ <version>${package-version}</version>
|
|
|
<mappings/>
|
|
|
</configuration>
|
|
|
</plugin>
|