Sfoglia il codice sorgente

AMBARI-10127. Sanitize view package names/versions. (yusaku)

Yusaku Sako 10 anni fa
parent
commit
8ced13165b

+ 1 - 1
contrib/views/jobs/src/main/resources/view.xml

@@ -17,7 +17,7 @@ limitations under the License. Kerberos, LDAP, Custom. Binary/Htt
 <view>
   <name>JOBS</name>
   <label>Jobs View</label>
-  <version>1.0.0</version>
+  <version>2.0.0</version>
   <parameter>
       <name>yarn.ats.url</name>
       <description>The URL to the YARN Application Timeline Server, used to provide Jobs information, typically, this is the yarn.timeline-service.webapp.address property in the yarn-site.xml configuration. For example: http://yarn.ats.address:8188</description>

+ 1 - 18
contrib/views/slider/pom.xml

@@ -13,7 +13,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.ambari.contrib.views</groupId>
   <artifactId>slider</artifactId>
-  <version>0.0.1-SNAPSHOT</version>
+  <version>2.0.0-SNAPSHOT</version>
   <name>Slider</name>
 
   <parent>
@@ -123,23 +123,6 @@
     </dependency>
   </dependencies>
 
-  <repositories>
-    <repository>
-      <id>ASF Staging</id>
-      <url>https://repository.apache.org/content/groups/staging/</url>
-    </repository>
-    <repository>
-      <id>ASF Snapshots</id>
-      <url>https://repository.apache.org/content/repositories/snapshots/</url>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-    </repository>
-  </repositories>
-
   <properties>
     <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
     <nodejs.directory>${basedir}/target/nodejs</nodejs.directory>

+ 1 - 1
contrib/views/slider/src/main/resources/view.xml

@@ -17,7 +17,7 @@ limitations under the License. Kerberos, LDAP, Custom. Binary/Htt
 <view>
   <name>SLIDER</name>
   <label>Slider Apps View</label>
-  <version>1.0.0</version>
+  <version>2.0.0</version>
 	<parameter>
 		<name>ambari.server.url</name>
 		<description>Ambari Server Cluster REST API URL (for example:

+ 4 - 17
contrib/views/tez/pom.xml

@@ -27,26 +27,13 @@
     <tez.version>0.6.0</tez.version>
   </properties>
   <modelVersion>4.0.0</modelVersion>
-  <groupId>org.apache.ambari</groupId>
-  <artifactId>tez-ambari-view</artifactId>
+  <groupId>org.apache.ambari.contrib.views</groupId>
+  <artifactId>tez-view</artifactId>
   <name>Tez</name>
   <version>${tez.view.version}</version>
-  <description>Tez Ambari View</description>
-  <repositories>
-    <repository>
-      <id>apache.snapshots</id>
-      <name>Apache Development Snapshot Repository</name>
-      <url>https://repository.apache.org/content/repositories/snapshots/</url>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-  <build>
+  <description>Tez View</description>
 
+  <build>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>

+ 2 - 2
contrib/views/tez/readme.md

@@ -35,7 +35,7 @@ The view can be built as a maven project.
 
 The build will produce the view archive.
 
-    target/tez-ambari-view-0.6.0-SNAPSHOT.jar
+    target/tez-view-0.6.0-SNAPSHOT.jar
 
 Configuration
 -----
@@ -71,7 +71,7 @@ Use the [Ambari Vagrant](https://cwiki.apache.org/confluence/display/AMBARI/Quic
 
 Deploy the TEZ view into Ambari.
 
-    cp tez-ambari-view-0.6.0-SNAPSHOT.jar /var/lib/ambari-server/resources/views/
+    cp tez-view-0.6.0-SNAPSHOT.jar /var/lib/ambari-server/resources/views/
     ambari-server restart
 
 From the Ambari Administration interface, create a TEZ view instance.

+ 3 - 3
pom.xml

@@ -173,7 +173,7 @@
             <configuration>
               <name>package-version</name>
               <value>${project.version}</value>
-              <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
+              <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)((\.|-).*)?</regex>
               <replacement>$1.$2.$3</replacement>
               <failIfNoMatch>true</failIfNoMatch>
             </configuration>
@@ -186,8 +186,8 @@
             <configuration>
               <name>package-release</name>
               <value>${project.version}</value>
-              <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-)(([0-9]+)|(SNAPSHOT)|(techwin)).*</regex>
-              <replacement>$5</replacement>
+              <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)((\.|-)(([0-9]+)|(SNAPSHOT)|(techwin)).*)?</regex>
+              <replacement>$6</replacement>
               <failIfNoMatch>true</failIfNoMatch>
             </configuration>
           </execution>