ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject git commit: AMBARI-4979. Limiting Ambari version to 3 digits (dlysnichenko)
Date Thu, 10 Apr 2014 18:46:50 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk f0c0c2ef3 -> 60dc78f95


AMBARI-4979. Limiting Ambari version to 3 digits (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/60dc78f9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/60dc78f9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/60dc78f9

Branch: refs/heads/trunk
Commit: 60dc78f95dd2dbcc7de4ad69e0b305b63acab076
Parents: f0c0c2e
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Thu Apr 10 21:45:50 2014 +0300
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Thu Apr 10 21:45:50 2014 +0300

----------------------------------------------------------------------
 ambari-agent/pom.xml                            |  6 ++--
 .../src/main/package/deb/control/control        |  2 +-
 .../src/main/package/deb/control/control        |  2 +-
 ambari-server/pom.xml                           |  7 ++--
 .../src/main/package/deb/control/control        |  2 +-
 ambari-views/pom.xml                            |  3 +-
 ambari-web/pom.xml                              |  4 +--
 pom.xml                                         | 35 ++++++++++++++++++++
 8 files changed, 48 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc78f9/ambari-agent/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index 871581a..d072e0f 100644
--- a/ambari-agent/pom.xml
+++ b/ambari-agent/pom.xml
@@ -89,8 +89,8 @@
             <configuration>
               <name>ambariVersion</name>
               <value>${project.version}</value>
-              <regex>-SNAPSHOT</regex>
-              <replacement></replacement>
+              <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
+              <replacement>$1.$2.$3</replacement>
               <failIfNoMatch>false</failIfNoMatch>
             </configuration>
           </execution>
@@ -397,7 +397,7 @@
         </executions>
         <configuration>
           <controlDir>${basedir}/src/main/package/deb/control</controlDir>
-          <deb>${basedir}/target/${artifactId}_${version}.deb</deb>
+          <deb>${basedir}/target/${artifactId}_${package-version}-${package-release}.deb</deb>
           <dataSet>
             <data>
               <src>${project.build.directory}/${project.artifactId}-${project.version}/ambari_agent</src>

http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc78f9/ambari-agent/src/main/package/deb/control/control
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/package/deb/control/control b/ambari-agent/src/main/package/deb/control/control
index 4ea7f6c..40cd855 100644
--- a/ambari-agent/src/main/package/deb/control/control
+++ b/ambari-agent/src/main/package/deb/control/control
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License
 Package: [[artifactId]]
-Version: [[version]]
+Version: [[package-version]]-[[package-release]]
 Section: [[deb.section]]
 Priority: [[deb.priority]]
 Depends: [[deb.dependency.list]]

http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc78f9/ambari-project/src/main/package/deb/control/control
----------------------------------------------------------------------
diff --git a/ambari-project/src/main/package/deb/control/control b/ambari-project/src/main/package/deb/control/control
index e37581a..d00c2cd 100644
--- a/ambari-project/src/main/package/deb/control/control
+++ b/ambari-project/src/main/package/deb/control/control
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License
 Package: [[artifactId]]
-Version: [[version]]
+Version: [[package-version]]-[[package-release]]
 Section: [[deb.section]]
 Priority: [[deb.priority]]
 Architecture: [[deb.architecture]]

http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc78f9/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index 2301b53..c2cb0e5 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -56,8 +56,8 @@
             <configuration>
               <name>ambariVersion</name>
               <value>${project.version}</value>
-              <regex>-SNAPSHOT</regex>
-              <replacement></replacement>
+              <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
+              <replacement>$1.$2.$3</replacement>
               <failIfNoMatch>false</failIfNoMatch>
             </configuration>
           </execution>
@@ -196,7 +196,6 @@
         </executions>
         <configuration>
           <copyright>2012, Apache Software Foundation</copyright>
-          <version>${project.version}</version>
           <group>Development</group>
           <description>Maven Recipe: RPM Package.</description>
           <requires>
@@ -472,7 +471,7 @@
         </executions>
         <configuration>
           <controlDir>${basedir}/src/main/package/deb/control</controlDir>
-          <deb>${basedir}/target/${artifactId}_${version}.deb</deb>
+          <deb>${basedir}/target/${artifactId}_${package-version}-${package-release}.deb</deb>
           <dataSet>
             <data>
               <type>template</type>

http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc78f9/ambari-server/src/main/package/deb/control/control
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/package/deb/control/control b/ambari-server/src/main/package/deb/control/control
index 4ea7f6c..40cd855 100644
--- a/ambari-server/src/main/package/deb/control/control
+++ b/ambari-server/src/main/package/deb/control/control
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License
 Package: [[artifactId]]
-Version: [[version]]
+Version: [[package-version]]-[[package-release]]
 Section: [[deb.section]]
 Priority: [[deb.priority]]
 Depends: [[deb.dependency.list]]

http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc78f9/ambari-views/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-views/pom.xml b/ambari-views/pom.xml
index 1d57874..e4fcb4a 100644
--- a/ambari-views/pom.xml
+++ b/ambari-views/pom.xml
@@ -71,7 +71,8 @@
                         <configuration>
                             <name>ambariVersion</name>
                             <value>${project.version}</value>
-                            <regex>-SNAPSHOT</regex>
+                            <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
+                            <replacement>$1.$2.$3</replacement>
                             <failIfNoMatch>false</failIfNoMatch>
                         </configuration>
                     </execution>

http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc78f9/ambari-web/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-web/pom.xml b/ambari-web/pom.xml
index 0bef098..a4c32a9 100644
--- a/ambari-web/pom.xml
+++ b/ambari-web/pom.xml
@@ -54,8 +54,8 @@
             <configuration>
               <name>ambariVersion</name>
                 <value>${project.version}</value>
-                <regex>-SNAPSHOT</regex>
-                <replacement></replacement>
+                <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
+                <replacement>$1.$2.$3</replacement>
               <failIfNoMatch>false</failIfNoMatch>
             </configuration>
           </execution>

http://git-wip-us.apache.org/repos/asf/ambari/blob/60dc78f9/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c9a48b3..79ae1d8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,6 +77,39 @@
     </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>
         <version>3.0</version>
@@ -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>


Mime
View raw message