You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2014/08/14 15:19:46 UTC

[6/6] git commit: AMBARI-6835. View Packaging: create a way to package views into Ambari by default using build time parameters (srimanth)

AMBARI-6835. View Packaging: create a way to package views into Ambari by default using build time parameters (srimanth)


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

Branch: refs/heads/branch-alerts-dev
Commit: 8c537a1fe1fa89bfbb0d5f6edf75e7c5fe93c5c1
Parents: 2f5ee09
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Wed Aug 13 14:13:27 2014 -0700
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Thu Aug 14 09:19:16 2014 -0400

----------------------------------------------------------------------
 ambari-server/pom.xml                           | 28 +++++++++++++++++---
 contrib/views/capacity-scheduler/pom.xml        | 17 ++++++++++++
 contrib/views/files/pom.xml                     | 17 ++++++++++++
 contrib/views/pig/pom.xml                       | 17 ++++++++++++
 contrib/views/pom.xml                           | 19 +++++++++++++
 contrib/views/slider/pom.xml                    | 17 ++++++++++++
 .../slider/clients/AmbariInternalClient.java    |  2 +-
 pom.xml                                         | 19 +++++++++++++
 8 files changed, 132 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8c537a1f/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index 72e9863..2ec71ab 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -35,6 +35,7 @@
     <resource_management.install.dir>/usr/lib/ambari-server/lib/resource_management</resource_management.install.dir>
     <ambari-web-dir>${basedir}/../ambari-web/public</ambari-web-dir>
     <ambari-admin-dir>${basedir}/../ambari-admin</ambari-admin-dir>
+    <contrib-views-dir>${basedir}/../contrib/views</contrib-views-dir>
   </properties>
   <build>
     <plugins>
@@ -423,7 +424,10 @@
               <filemode>755</filemode>
               <sources>
                 <source>
-                  <location>${ambari-admin-dir}/target/ambari-admin-${project.version}.jar</location>
+                  <location>${ambari-admin-dir}/target</location>
+                  <includes>
+                    <include>*.jar</include>
+                  </includes>
                 </source>
               </sources>
             </mapping>
@@ -754,8 +758,9 @@
             </mapper>
           </data>
           <data>
-            <src>${ambari-admin-dir}/target/ambari-admin-${project.version}.jar</src>
-            <type>file</type>
+            <src>${ambari-admin-dir}/target</src>
+            <type>directory</type>
+            <includes>*.jar</includes>
             <mapper>
               <type>perm</type>
               <prefix>/var/lib/ambari-server/resources/views</prefix>
@@ -982,6 +987,23 @@
               <goal>run</goal>
             </goals>
           </execution>
+          <!-- Copies compiled views into known location for RPM builds -->
+          <execution>
+            <id>copy-view-jars</id>
+            <phase>package</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <copy todir="${ambari-admin-dir}/target" flatten="true">
+                  <fileset dir="${contrib-views-dir}">
+                    <include name="*/target/*jar" />
+                  </fileset>
+                </copy>
+              </target>
+            </configuration>
+          </execution>
         </executions>
       </plugin>
     </plugins>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c537a1f/contrib/views/capacity-scheduler/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/pom.xml b/contrib/views/capacity-scheduler/pom.xml
index 225acb8..bf851c8 100644
--- a/contrib/views/capacity-scheduler/pom.xml
+++ b/contrib/views/capacity-scheduler/pom.xml
@@ -149,6 +149,23 @@
             </execution>
         </executions>
       </plugin>
+      <plugin>
+         <groupId>org.vafer</groupId>
+         <artifactId>jdeb</artifactId>
+         <version>1.0.1</version>
+         <executions>
+             <execution>
+                 <phase>none</phase>
+                 <goals>
+                     <goal>jdeb</goal>
+                 </goals>
+             </execution>
+         </executions>
+         <configuration>
+             <skip>true</skip>
+             <submodules>false</submodules>
+         </configuration>
+     </plugin>
     </plugins>
     <resources>
         <resource>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c537a1f/contrib/views/files/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/views/files/pom.xml b/contrib/views/files/pom.xml
index 8194fc7..dd8325e 100644
--- a/contrib/views/files/pom.xml
+++ b/contrib/views/files/pom.xml
@@ -207,6 +207,23 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+         <groupId>org.vafer</groupId>
+         <artifactId>jdeb</artifactId>
+         <version>1.0.1</version>
+         <executions>
+             <execution>
+                 <phase>none</phase>
+                 <goals>
+                     <goal>jdeb</goal>
+                 </goals>
+             </execution>
+         </executions>
+         <configuration>
+             <skip>true</skip>
+             <submodules>false</submodules>
+         </configuration>
+     </plugin>
     </plugins>
     <resources>
         <resource>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c537a1f/contrib/views/pig/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/views/pig/pom.xml b/contrib/views/pig/pom.xml
index f1ec302..809cdd3 100644
--- a/contrib/views/pig/pom.xml
+++ b/contrib/views/pig/pom.xml
@@ -199,6 +199,23 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+       <groupId>org.vafer</groupId>
+       <artifactId>jdeb</artifactId>
+       <version>1.0.1</version>
+       <executions>
+           <execution>
+               <phase>none</phase>
+               <goals>
+                   <goal>jdeb</goal>
+               </goals>
+           </execution>
+       </executions>
+       <configuration>
+           <skip>true</skip>
+           <submodules>false</submodules>
+       </configuration>
+     </plugin>
     </plugins>
     <resources>
       <resource>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c537a1f/contrib/views/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/views/pom.xml b/contrib/views/pom.xml
index 529d12a..d5b1e2e 100644
--- a/contrib/views/pom.xml
+++ b/contrib/views/pom.xml
@@ -88,6 +88,25 @@
           <mappings/>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.vafer</groupId>
+        <artifactId>jdeb</artifactId>
+        <version>1.0.1</version>
+        <executions>
+          <execution>
+            <phase>none</phase>
+            <goals>
+              <goal>jdeb</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <skip>true</skip>
+          <attach>false</attach>
+          <submodules>true</submodules>
+          <controlDir>${basedir}/../../ambari-project/src/main/package/deb/control</controlDir>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
   <dependencyManagement>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c537a1f/contrib/views/slider/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/views/slider/pom.xml b/contrib/views/slider/pom.xml
index 9f66554..f3d6ad0 100644
--- a/contrib/views/slider/pom.xml
+++ b/contrib/views/slider/pom.xml
@@ -483,6 +483,23 @@
 					</execution>
 				</executions>
 			</plugin>
+			<plugin>
+        <groupId>org.vafer</groupId>
+        <artifactId>jdeb</artifactId>
+        <version>1.0.1</version>
+        <executions>
+            <execution>
+                <phase>none</phase>
+                <goals>
+                    <goal>jdeb</goal>
+                </goals>
+            </execution>
+        </executions>
+        <configuration>
+            <skip>true</skip>
+            <submodules>false</submodules>
+        </configuration>
+    </plugin>
 		</plugins>
 		<resources>
 			<resource>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c537a1f/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/clients/AmbariInternalClient.java
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/clients/AmbariInternalClient.java b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/clients/AmbariInternalClient.java
index d7f41dc..529af9d 100644
--- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/clients/AmbariInternalClient.java
+++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/clients/AmbariInternalClient.java
@@ -69,7 +69,7 @@ public class AmbariInternalClient implements AmbariClient {
 				for (Map.Entry<String, Object> siteEntry : desiredConfigsMapResource
 				    .entrySet()) {
 					desiredConfigsMap.put(siteEntry.getKey(),
-					    ((DesiredConfig) siteEntry.getValue()).getVersion());
+					    ((DesiredConfig) siteEntry.getValue()).getTag());
 				}
 				cluster.setDesiredConfigs(desiredConfigsMap);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c537a1f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2feae5a..356090e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -286,6 +286,25 @@
       </modules>
     </profile>
     <profile>
+      <id>default-views</id>
+      <activation>
+        <property>
+          <name>views</name>
+        </property>
+      </activation>
+      <modules>
+        <module>ambari-web</module>
+        <module>ambari-project</module>
+        <module>ambari-views</module>
+        <module>ambari-admin</module>
+        <module>contrib/views</module>
+        <module>ambari-server</module>
+        <module>ambari-agent</module>
+        <module>ambari-client</module>
+        <module>ambari-shell</module>
+      </modules>
+    </profile>
+    <profile>
       <id>static-web</id>
       <modules>
         <module>ambari-project</module>