ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpapirkovs...@apache.org
Subject ambari git commit: BUG-32417. StormMetricsReporter doesn't package dependencies in single jar. (mpapyrkovskyy)
Date Wed, 04 Mar 2015 17:50:02 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 1475c7a95 -> 0482a29ca


BUG-32417. StormMetricsReporter doesn't package dependencies in single jar. (mpapyrkovskyy)


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

Branch: refs/heads/trunk
Commit: 0482a29ca02bf0d5964a7a832705fc1f22efcb8d
Parents: 1475c7a
Author: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Authored: Wed Mar 4 19:32:26 2015 +0200
Committer: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Committed: Wed Mar 4 19:49:48 2015 +0200

----------------------------------------------------------------------
 .../ambari-metrics-storm-sink/pom.xml           | 75 ++++++++++++++------
 .../src/main/assemblies/jar-with-common.xml     | 38 ----------
 2 files changed, 53 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0482a29c/ambari-metrics/ambari-metrics-storm-sink/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-storm-sink/pom.xml b/ambari-metrics/ambari-metrics-storm-sink/pom.xml
index 0bd8fba..21d3a90 100644
--- a/ambari-metrics/ambari-metrics-storm-sink/pom.xml
+++ b/ambari-metrics/ambari-metrics-storm-sink/pom.xml
@@ -31,33 +31,12 @@ limitations under the License.
   <packaging>jar</packaging>
 
   <properties>
-    <storm.version>0.9.3</storm.version>
+    <storm.version>0.9.3.2.2.1.0-2341</storm.version>
   </properties>
 
   <build>
     <plugins>
       <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <executions>
-          <execution>
-            <configuration>
-              <descriptors>
-                <descriptor>src/main/assemblies/jar-with-common.xml</descriptor>
-              </descriptors>
-              <attach>false</attach>
-              <tarLongFileMode>gnu</tarLongFileMode>
-              <appendAssemblyId>false</appendAssemblyId>
-              <finalName>${project.artifactId}-with-common-${project.version}</finalName>
-            </configuration>
-            <id>build-jar</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
         <version>3.0</version>
       </plugin>
@@ -99,6 +78,58 @@ limitations under the License.
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>2.2</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <outputFile>${project.build.directory}/${project.artifactId}-with-common-${project.version}.jar</outputFile>
+          <minimizeJar>false</minimizeJar>
+          <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
+          <artifactSet>
+            <includes>
+              <include>org.apache.ambari:ambari-metrics-common</include>
+              <include>org.codehaus.jackson:jackson-mapper-asl</include>
+              <include>org.codehaus.jackson:jackson-core-asl</include>
+              <include>org.codehaus.jackson:jackson-xc</include>
+              <include>org.apache.hadoop:hadoop-annotations</include>
+              <include>commons-httpclient:commons-httpclient</include>
+              <include>commons-logging:commons-logging</include>
+              <include>commons-lang:commons-lang</include>
+            </includes>
+          </artifactSet>
+          <relocations>
+            <relocation>
+              <pattern>org.apache.commons.logging</pattern>
+              <shadedPattern>org.apache.hadoop.metrics2.sink.relocated.commons.logging</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>org.apache.commons.httpclient</pattern>
+              <shadedPattern>org.apache.hadoop.metrics2.sink.relocated.commons.httpclient</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>org.apache.commons.lang</pattern>
+              <shadedPattern>org.apache.hadoop.metrics2.sink.relocated.commons.lang</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>org.apache.hadoop.classification</pattern>
+              <shadedPattern>org.apache.hadoop.metrics2.sink.relocated.hadoop.classification</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>org.codehaus.jackson</pattern>
+              <shadedPattern>org.apache.hadoop.metrics2.sink.relocated.jackson</shadedPattern>
+            </relocation>
+          </relocations>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
   <dependencies>

http://git-wip-us.apache.org/repos/asf/ambari/blob/0482a29c/ambari-metrics/ambari-metrics-storm-sink/src/main/assemblies/jar-with-common.xml
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-storm-sink/src/main/assemblies/jar-with-common.xml
b/ambari-metrics/ambari-metrics-storm-sink/src/main/assemblies/jar-with-common.xml
deleted file mode 100644
index 7102b07..0000000
--- a/ambari-metrics/ambari-metrics-storm-sink/src/main/assemblies/jar-with-common.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
--->
-<assembly>
-  <id>jar-with-common</id>
-  <formats>
-    <format>jar</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <dependencySets>
-    <dependencySet>
-      <outputDirectory>/</outputDirectory>
-      <unpack>true</unpack>
-      <includes>
-        <include>org.apache.ambari:ambari-metrics-common</include>
-        <include>org.apache.ambari:ambari-metrics-storm-sink</include>
-        <include>org.codehaus.jackson:jackson-mapper-asl</include> <!--missing
in storm classpath-->
-        <include>org.codehaus.jackson:jackson-core-asl</include> <!--missing
in storm classpath-->
-        <include>org.codehaus.jackson:jackson-xc</include> <!--missing in
storm classpath-->
-        <include>commons-httpclient:commons-httpclient</include> <!--missing
in storm classpath-->
-      </includes>
-    </dependencySet>
-  </dependencySets>
-</assembly>


Mime
View raw message