hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject hadoop git commit: HADOOP-13999 Add -DskipShade maven profile to disable jar shading to reduce compile time. Contributed by Arun Suresh
Date Thu, 19 Jan 2017 11:51:58 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk ed33ce11d -> 85e4961f6


HADOOP-13999 Add -DskipShade maven profile to disable jar shading to reduce compile time. Contributed by Arun Suresh


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/85e4961f
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/85e4961f
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/85e4961f

Branch: refs/heads/trunk
Commit: 85e4961f60b7f8cd1343b6f2b9f4c8bb1a5de6ac
Parents: ed33ce1
Author: Steve Loughran <stevel@apache.org>
Authored: Thu Jan 19 11:49:40 2017 +0000
Committer: Steve Loughran <stevel@apache.org>
Committed: Thu Jan 19 11:49:40 2017 +0000

----------------------------------------------------------------------
 hadoop-client-modules/hadoop-client-api/pom.xml | 318 +++++++------
 .../hadoop-client-integration-tests/pom.xml     | 173 ++++---
 .../hadoop-client-minicluster/pom.xml           | 426 ++++++++++--------
 .../hadoop-client-runtime/pom.xml               | 446 ++++++++++---------
 4 files changed, 741 insertions(+), 622 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/85e4961f/hadoop-client-modules/hadoop-client-api/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-client-modules/hadoop-client-api/pom.xml b/hadoop-client-modules/hadoop-client-api/pom.xml
index 9342d53..de34a9a 100644
--- a/hadoop-client-modules/hadoop-client-api/pom.xml
+++ b/hadoop-client-modules/hadoop-client-api/pom.xml
@@ -68,149 +68,179 @@
       </exclusions>
     </dependency>
   </dependencies>
-  <build>
-    <plugins>
-      <!-- We contain no source -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-source-plugin</artifactId>
-          <configuration>
-            <skipSource>true</skipSource>
-          </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-        <dependencies>
-          <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-maven-plugins</artifactId>
-            <version>${project.version}</version>
-          </dependency>
-        </dependencies>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-              <artifactSet>
-                <includes>
-                  <include>org.apache.hadoop:*</include>
-                </includes>
-              </artifactSet>
-              <filters>
-                <!-- We get these package level classes from various yarn api jars -->
-                <filter>
-                  <artifact>org.apache.hadoop:hadoop-yarn-common</artifact>
-                  <excludes>
-                    <exclude>org/apache/hadoop/yarn/factories/package-info.class</exclude>
-                    <exclude>org/apache/hadoop/yarn/util/package-info.class</exclude>
-                    <exclude>org/apache/hadoop/yarn/factory/providers/package-info.class</exclude>
-                    <exclude>org/apache/hadoop/yarn/client/api/impl/package-info.class</exclude>
-                    <exclude>org/apache/hadoop/yarn/client/api/package-info.class</exclude>
-                  </excludes>
-                </filter>
-              </filters>
-              <relocations>
-                <relocation>
-                  <pattern>org/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.org.</shadedPattern>
-                  <excludes>
-                    <exclude>org/apache/hadoop/*</exclude>
-                    <exclude>org/apache/hadoop/**/*</exclude>
-                    <!-- Our non-shaded htrace and logging libraries -->
-                    <exclude>org/apache/htrace/*</exclude>
-                    <exclude>org/apache/htrace/**/*</exclude>
-                    <exclude>org/slf4j/*</exclude>
-                    <exclude>org/slf4j/**/*</exclude>
-                    <exclude>org/apache/commons/logging/*</exclude>
-                    <exclude>org/apache/commons/logging/**/*</exclude>
-                    <exclude>org/apache/log4j/*</exclude>
-                    <exclude>org/apache/log4j/**/*</exclude>
-                    <exclude>**/pom.xml</exclude>
-                    <!-- Not the org/ packages that are a part of the jdk -->
-                    <exclude>org/ietf/jgss/*</exclude>
-                    <exclude>org/omg/**/*</exclude>
-                    <exclude>org/w3c/dom/*</exclude>
-                    <exclude>org/w3c/dom/**/*</exclude>
-                    <exclude>org/xml/sax/*</exclude>
-                    <exclude>org/xml/sax/**/*</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>com/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.com.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                    <!-- Not the com/ packages that are a part of particular jdk implementations -->
-                    <exclude>com/sun/tools/*</exclude>
-                    <exclude>com/sun/javadoc/*</exclude>
-                    <exclude>com/sun/security/*</exclude>
-                    <exclude>com/sun/jndi/*</exclude>
-                    <exclude>com/sun/management/*</exclude>
-                    <exclude>com/sun/tools/**/*</exclude>
-                    <exclude>com/sun/javadoc/**/*</exclude>
-                    <exclude>com/sun/security/**/*</exclude>
-                    <exclude>com/sun/jndi/**/*</exclude>
-                    <exclude>com/sun/management/**/*</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>io/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.io.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                    <!-- Exclude config keys for Hadoop that look like package names -->
-                    <exclude>io/compression/*</exclude>
-                    <exclude>io/compression/**/*</exclude>
-                    <exclude>io/mapfile/*</exclude>
-                    <exclude>io/mapfile/**/*</exclude>
-                    <exclude>io/map/index/*</exclude>
-                    <exclude>io/seqfile/*</exclude>
-                    <exclude>io/seqfile/**/*</exclude>
-                    <exclude>io/file/buffer/size</exclude>
-                    <exclude>io/skip/checksum/errors</exclude>
-                    <exclude>io/sort/*</exclude>
-                    <exclude>io/serializations</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>javax/servlet/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.javax.servlet.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>net/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.net.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                    <!-- Exclude config keys for Hadoop that look like package names -->
-                    <exclude>net/topology/*</exclude>
-                    <exclude>net/topology/**/*</exclude>
-                  </excludes>
-                </relocation>
-              </relocations>
-              <transformers>
-                <!-- Needed until MSHADE-182 -->
-                <transformer implementation="org.apache.hadoop.maven.plugin.shade.resource.ServicesResourceTransformer"/>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
-                    <addHeader>false</addHeader>
-                </transformer>
-              </transformers>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>license-maven-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
+  <profiles>
+    <profile>
+      <id>shade</id>
+      <activation>
+        <property><name>!skipShade</name></property>
+      </activation>
+      <build>
+        <plugins>
+          <!-- We contain no source -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-source-plugin</artifactId>
+              <configuration>
+                <skipSource>true</skipSource>
+              </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-shade-plugin</artifactId>
+            <dependencies>
+              <dependency>
+                <groupId>org.apache.hadoop</groupId>
+                <artifactId>hadoop-maven-plugins</artifactId>
+                <version>${project.version}</version>
+              </dependency>
+            </dependencies>
+            <executions>
+              <execution>
+                <phase>package</phase>
+                <goals>
+                  <goal>shade</goal>
+                </goals>
+                <configuration>
+                  <artifactSet>
+                    <includes>
+                      <include>org.apache.hadoop:*</include>
+                    </includes>
+                  </artifactSet>
+                  <filters>
+                    <!-- We get these package level classes from various yarn api jars -->
+                    <filter>
+                      <artifact>org.apache.hadoop:hadoop-yarn-common</artifact>
+                      <excludes>
+                        <exclude>org/apache/hadoop/yarn/factories/package-info.class</exclude>
+                        <exclude>org/apache/hadoop/yarn/util/package-info.class</exclude>
+                        <exclude>org/apache/hadoop/yarn/factory/providers/package-info.class</exclude>
+                        <exclude>org/apache/hadoop/yarn/client/api/impl/package-info.class</exclude>
+                        <exclude>org/apache/hadoop/yarn/client/api/package-info.class</exclude>
+                      </excludes>
+                    </filter>
+                  </filters>
+                  <relocations>
+                    <relocation>
+                      <pattern>org/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.org.</shadedPattern>
+                      <excludes>
+                        <exclude>org/apache/hadoop/*</exclude>
+                        <exclude>org/apache/hadoop/**/*</exclude>
+                        <!-- Our non-shaded htrace and logging libraries -->
+                        <exclude>org/apache/htrace/*</exclude>
+                        <exclude>org/apache/htrace/**/*</exclude>
+                        <exclude>org/slf4j/*</exclude>
+                        <exclude>org/slf4j/**/*</exclude>
+                        <exclude>org/apache/commons/logging/*</exclude>
+                        <exclude>org/apache/commons/logging/**/*</exclude>
+                        <exclude>org/apache/log4j/*</exclude>
+                        <exclude>org/apache/log4j/**/*</exclude>
+                        <exclude>**/pom.xml</exclude>
+                        <!-- Not the org/ packages that are a part of the jdk -->
+                        <exclude>org/ietf/jgss/*</exclude>
+                        <exclude>org/omg/**/*</exclude>
+                        <exclude>org/w3c/dom/*</exclude>
+                        <exclude>org/w3c/dom/**/*</exclude>
+                        <exclude>org/xml/sax/*</exclude>
+                        <exclude>org/xml/sax/**/*</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>com/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.com.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                        <!-- Not the com/ packages that are a part of particular jdk implementations -->
+                        <exclude>com/sun/tools/*</exclude>
+                        <exclude>com/sun/javadoc/*</exclude>
+                        <exclude>com/sun/security/*</exclude>
+                        <exclude>com/sun/jndi/*</exclude>
+                        <exclude>com/sun/management/*</exclude>
+                        <exclude>com/sun/tools/**/*</exclude>
+                        <exclude>com/sun/javadoc/**/*</exclude>
+                        <exclude>com/sun/security/**/*</exclude>
+                        <exclude>com/sun/jndi/**/*</exclude>
+                        <exclude>com/sun/management/**/*</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>io/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.io.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                        <!-- Exclude config keys for Hadoop that look like package names -->
+                        <exclude>io/compression/*</exclude>
+                        <exclude>io/compression/**/*</exclude>
+                        <exclude>io/mapfile/*</exclude>
+                        <exclude>io/mapfile/**/*</exclude>
+                        <exclude>io/map/index/*</exclude>
+                        <exclude>io/seqfile/*</exclude>
+                        <exclude>io/seqfile/**/*</exclude>
+                        <exclude>io/file/buffer/size</exclude>
+                        <exclude>io/skip/checksum/errors</exclude>
+                        <exclude>io/sort/*</exclude>
+                        <exclude>io/serializations</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>javax/servlet/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.javax.servlet.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>net/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.net.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                        <!-- Exclude config keys for Hadoop that look like package names -->
+                        <exclude>net/topology/*</exclude>
+                        <exclude>net/topology/**/*</exclude>
+                      </excludes>
+                    </relocation>
+                  </relocations>
+                  <transformers>
+                    <!-- Needed until MSHADE-182 -->
+                    <transformer implementation="org.apache.hadoop.maven.plugin.shade.resource.ServicesResourceTransformer"/>
+                    <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
+                    <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
+                        <addHeader>false</addHeader>
+                    </transformer>
+                  </transformers>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>license-maven-plugin</artifactId>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>noshade</id>
+      <activation>
+        <property><name>skipShade</name></property>
+      </activation>
+      <build>
+        <plugins>
+          <!-- We contain no source -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-source-plugin</artifactId>
+              <configuration>
+                <skipSource>true</skipSource>
+              </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>license-maven-plugin</artifactId>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/85e4961f/hadoop-client-modules/hadoop-client-integration-tests/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-client-modules/hadoop-client-integration-tests/pom.xml b/hadoop-client-modules/hadoop-client-integration-tests/pom.xml
index 0df6776..76f7394 100644
--- a/hadoop-client-modules/hadoop-client-integration-tests/pom.xml
+++ b/hadoop-client-modules/hadoop-client-integration-tests/pom.xml
@@ -33,21 +33,6 @@
 
   <dependencies>
     <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-client-api</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-client-runtime</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-client-minicluster</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
       <scope>test</scope>
@@ -68,63 +53,107 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
-  <build>
-    <plugins>
-      <!-- Because our tests rely on our shaded artifacts, we can't compile
-           them until after the package phase has run.
-        -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <executions>
-        <!--
-           First, let's make sure the normal test-compile doesn't try to
-           compile our integration tests.
-        -->
-          <execution>
-            <id>default-testCompile</id>
-            <phase>test-compile</phase>
-            <configuration>
-              <testExcludes>
-                <testExclude>**/IT*</testExclude>
-                <testExclude>**/*IT</testExclude>
-              </testExcludes>
-            </configuration>
-          </execution>
-        <!--
-           Finally, let's make a 'just for integration tests'-compile that
-           fires off prior to our integration tests but after the package
-           phase has created our shaded artifacts.
-        -->
-          <execution>
-            <id>compile-integration-tests</id>
-            <phase>pre-integration-test</phase>
-            <goals>
-              <goal>testCompile</goal>
-            </goals>
-            <configuration>
-              <testIncludes>
-                <testInclude>**/IT*</testInclude>
-                <testInclude>**/*IT</testInclude>
-              </testIncludes>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>integration-test</goal>
-              <goal>verify</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
+  <profiles>
+    <profile>
+      <id>shade</id>
+      <activation>
+        <property><name>!skipShade</name></property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-client-api</artifactId>
+          <scope>test</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-client-runtime</artifactId>
+          <scope>test</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-client-minicluster</artifactId>
+          <scope>test</scope>
+        </dependency>
+      </dependencies>
+      <build>
+        <plugins>
+          <!-- Because our tests rely on our shaded artifacts, we can't compile
+               them until after the package phase has run.
+            -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <executions>
+            <!--
+               First, let's make sure the normal test-compile doesn't try to
+               compile our integration tests.
+            -->
+              <execution>
+                <id>default-testCompile</id>
+                <phase>test-compile</phase>
+                <configuration>
+                  <testExcludes>
+                    <testExclude>**/IT*</testExclude>
+                    <testExclude>**/*IT</testExclude>
+                  </testExcludes>
+                </configuration>
+              </execution>
+            <!--
+               Finally, let's make a 'just for integration tests'-compile that
+               fires off prior to our integration tests but after the package
+               phase has created our shaded artifacts.
+            -->
+              <execution>
+                <id>compile-integration-tests</id>
+                <phase>pre-integration-test</phase>
+                <goals>
+                  <goal>testCompile</goal>
+                </goals>
+                <configuration>
+                  <testIncludes>
+                    <testInclude>**/IT*</testInclude>
+                    <testInclude>**/*IT</testInclude>
+                  </testIncludes>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-failsafe-plugin</artifactId>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>integration-test</goal>
+                  <goal>verify</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>noshade</id>
+      <activation>
+        <property><name>skipShade</name></property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-common</artifactId>
+          <scope>test</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-hdfs</artifactId>
+          <scope>test</scope>
+          <type>test-jar</type>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
 
 </project>
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/85e4961f/hadoop-client-modules/hadoop-client-minicluster/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-client-modules/hadoop-client-minicluster/pom.xml b/hadoop-client-modules/hadoop-client-minicluster/pom.xml
index 8ab70d8..dd5f337 100644
--- a/hadoop-client-modules/hadoop-client-minicluster/pom.xml
+++ b/hadoop-client-modules/hadoop-client-minicluster/pom.xml
@@ -542,204 +542,234 @@
     <!-- skipping guice-servlet because it's above -->
     <!-- skipping io.netty:netty because it's in client -->
   </dependencies>
-  <build>
-    <plugins>
-      <!-- We contain no source -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-source-plugin</artifactId>
-          <configuration>
-            <skipSource>true</skipSource>
-          </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-        <dependencies>
-          <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-maven-plugins</artifactId>
-            <version>${project.version}</version>
-          </dependency>
-        </dependencies>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-              <createSourceJar>true</createSourceJar>
-              <artifactSet>
-                <excludes>
-                  <!-- Fine to expose our already-shaded deps as dependencies -->
-                  <exclude>org.apache.hadoop:hadoop-annotations</exclude>
-                  <exclude>org.apache.hadoop:hadoop-client-api</exclude>
-                  <exclude>org.apache.hadoop:hadoop-client-runtime</exclude>
-                  <!-- Fine to expose our purposefully not-shaded deps as dependencies -->
-                  <exclude>org.apache.htrace:htrace-core4</exclude>
-                  <exclude>org.slf4j:slf4j-api</exclude>
-                  <exclude>commons-logging:commons-logging</exclude>
-                  <exclude>junit:junit</exclude>
-                  <!-- Keep optional runtime deps out of the shading -->
-                  <exclude>org.apache.hadoop:hadoop-yarn-server-timelineservice</exclude>
-                  <exclude>log4j:log4j</exclude>
-                  <!-- We need a filter that matches just those things that are included in the above artiacts -->
-                </excludes>
-              </artifactSet>
-              <filters>
-                <!-- Some of our dependencies include source, so remove it. -->
-                <filter>
-                  <artifact>*:*</artifact>
-                  <excludes>
-                    <exclude>**/*.java</exclude>
-                  </excludes>
-                </filter>
-                <!-- We pull in several test jars; keep out the actual test classes -->
-                <filter>
-                  <artifact>*:*</artifact>
-                  <excludes>
-                    <exclude>**/Test*.class</exclude>
-                  </excludes>
-                </filter>
-                <!-- Since runtime has classes for these jars, we exclude them.
-                     We still want the java services api files, since those were excluded in runtime
-                  -->
-                <filter>
-                  <artifact>com.sun.jersey:jersey-client</artifact>
-                  <excludes>
-                    <exclude>**/*.class</exclude>
-                  </excludes>
-                </filter>
-                <filter>
-                  <artifact>com.sun.jersey:jersey-core</artifact>
-                  <excludes>
-                    <exclude>**/*.class</exclude>
-                  </excludes>
-                </filter>
-                <filter>
-                  <artifact>com.sun.jersey:jersey-servlet</artifact>
-                  <excludes>
-                    <exclude>**/*.class</exclude>
-                  </excludes>
-                </filter>
-              </filters>
-              <relocations>
-                <relocation>
-                  <pattern>org/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.org.</shadedPattern>
-                  <excludes>
-                    <exclude>org/apache/hadoop/*</exclude>
-                    <exclude>org/apache/hadoop/**/*</exclude>
-                    <!-- Our non-shaded htrace and logging libraries -->
-                    <exclude>org/apache/htrace/*</exclude>
-                    <exclude>org/apache/htrace/**/*</exclude>
-                    <exclude>org/slf4j/*</exclude>
-                    <exclude>org/slf4j/**/*</exclude>
-                    <exclude>org/apache/commons/logging/*</exclude>
-                    <exclude>org/apache/commons/logging/**/*</exclude>
-                    <exclude>org/apache/log4j/*</exclude>
-                    <exclude>org/apache/log4j/**/*</exclude>
-                    <exclude>**/pom.xml</exclude>
-                    <!-- Our non-shaded JUnit library -->
-                    <exclude>org/junit/*</exclude>
-                    <exclude>org/junit/**/*</exclude>
-                    <!-- Not the org/ packages that are a part of the jdk -->
-                    <exclude>org/ietf/jgss/*</exclude>
-                    <exclude>org/omg/**/*</exclude>
-                    <exclude>org/w3c/dom/*</exclude>
-                    <exclude>org/w3c/dom/**/*</exclude>
-                    <exclude>org/xml/sax/*</exclude>
-                    <exclude>org/xml/sax/**/*</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>com/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.com.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                    <!-- Not the com/ packages that are a part of particular jdk implementations -->
-                    <exclude>com/sun/tools/*</exclude>
-                    <exclude>com/sun/javadoc/*</exclude>
-                    <exclude>com/sun/security/*</exclude>
-                    <exclude>com/sun/jndi/*</exclude>
-                    <exclude>com/sun/management/*</exclude>
-                    <exclude>com/sun/tools/**/*</exclude>
-                    <exclude>com/sun/javadoc/**/*</exclude>
-                    <exclude>com/sun/security/**/*</exclude>
-                    <exclude>com/sun/jndi/**/*</exclude>
-                    <exclude>com/sun/management/**/*</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>io/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.io.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                    <!-- Exclude config keys for Hadoop that look like package names -->
-                    <exclude>io/compression/*</exclude>
-                    <exclude>io/compression/**/*</exclude>
-                    <exclude>io/mapfile/*</exclude>
-                    <exclude>io/mapfile/**/*</exclude>
-                    <exclude>io/map/index/*</exclude>
-                    <exclude>io/seqfile/*</exclude>
-                    <exclude>io/seqfile/**/*</exclude>
-                    <exclude>io/file/buffer/size</exclude>
-                    <exclude>io/skip/checksum/errors</exclude>
-                    <exclude>io/sort/*</exclude>
-                    <exclude>io/serializations</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>javax/el/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.javax.el.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>javax/inject/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.javax.inject.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>javax/servlet/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.javax.servlet.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>net/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.net.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                    <!-- Exclude config keys for Hadoop that look like package names -->
-                    <exclude>net/topology/*</exclude>
-                    <exclude>net/topology/**/*</exclude>
-                  </excludes>
-                </relocation>
-              </relocations>
-              <transformers>
-                <!-- Needed until MSHADE-182 -->
-                <transformer implementation="org.apache.hadoop.maven.plugin.shade.resource.ServicesResourceTransformer"/>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
-                  <addHeader>false</addHeader>
-                </transformer>
-              </transformers>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>license-maven-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
+  <profiles>
+    <profile>
+      <id>shade</id>
+      <activation>
+        <property><name>!skipShade</name></property>
+      </activation>
+      <build>
+        <plugins>
+          <!-- We contain no source -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-source-plugin</artifactId>
+              <configuration>
+                <skipSource>true</skipSource>
+              </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-shade-plugin</artifactId>
+            <dependencies>
+              <dependency>
+                <groupId>org.apache.hadoop</groupId>
+                <artifactId>hadoop-maven-plugins</artifactId>
+                <version>${project.version}</version>
+              </dependency>
+            </dependencies>
+            <executions>
+              <execution>
+                <phase>package</phase>
+                <goals>
+                  <goal>shade</goal>
+                </goals>
+                <configuration>
+                  <createSourceJar>true</createSourceJar>
+                  <artifactSet>
+                    <excludes>
+                      <!-- Fine to expose our already-shaded deps as dependencies -->
+                      <exclude>org.apache.hadoop:hadoop-annotations</exclude>
+                      <exclude>org.apache.hadoop:hadoop-client-api</exclude>
+                      <exclude>org.apache.hadoop:hadoop-client-runtime</exclude>
+                      <!-- Fine to expose our purposefully not-shaded deps as dependencies -->
+                      <exclude>org.apache.htrace:htrace-core4</exclude>
+                      <exclude>org.slf4j:slf4j-api</exclude>
+                      <exclude>commons-logging:commons-logging</exclude>
+                      <exclude>junit:junit</exclude>
+                      <!-- Keep optional runtime deps out of the shading -->
+                      <exclude>org.apache.hadoop:hadoop-yarn-server-timelineservice</exclude>
+                      <exclude>log4j:log4j</exclude>
+                      <!-- We need a filter that matches just those things that are included in the above artiacts -->
+                    </excludes>
+                  </artifactSet>
+                  <filters>
+                    <!-- Some of our dependencies include source, so remove it. -->
+                    <filter>
+                      <artifact>*:*</artifact>
+                      <excludes>
+                        <exclude>**/*.java</exclude>
+                      </excludes>
+                    </filter>
+                    <!-- We pull in several test jars; keep out the actual test classes -->
+                    <filter>
+                      <artifact>*:*</artifact>
+                      <excludes>
+                        <exclude>**/Test*.class</exclude>
+                      </excludes>
+                    </filter>
+                    <!-- Since runtime has classes for these jars, we exclude them.
+                         We still want the java services api files, since those were excluded in runtime
+                      -->
+                    <filter>
+                      <artifact>com.sun.jersey:jersey-client</artifact>
+                      <excludes>
+                        <exclude>**/*.class</exclude>
+                      </excludes>
+                    </filter>
+                    <filter>
+                      <artifact>com.sun.jersey:jersey-core</artifact>
+                      <excludes>
+                        <exclude>**/*.class</exclude>
+                      </excludes>
+                    </filter>
+                    <filter>
+                      <artifact>com.sun.jersey:jersey-servlet</artifact>
+                      <excludes>
+                        <exclude>**/*.class</exclude>
+                      </excludes>
+                    </filter>
+                  </filters>
+                  <relocations>
+                    <relocation>
+                      <pattern>org/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.org.</shadedPattern>
+                      <excludes>
+                        <exclude>org/apache/hadoop/*</exclude>
+                        <exclude>org/apache/hadoop/**/*</exclude>
+                        <!-- Our non-shaded htrace and logging libraries -->
+                        <exclude>org/apache/htrace/*</exclude>
+                        <exclude>org/apache/htrace/**/*</exclude>
+                        <exclude>org/slf4j/*</exclude>
+                        <exclude>org/slf4j/**/*</exclude>
+                        <exclude>org/apache/commons/logging/*</exclude>
+                        <exclude>org/apache/commons/logging/**/*</exclude>
+                        <exclude>org/apache/log4j/*</exclude>
+                        <exclude>org/apache/log4j/**/*</exclude>
+                        <exclude>**/pom.xml</exclude>
+                        <!-- Our non-shaded JUnit library -->
+                        <exclude>org/junit/*</exclude>
+                        <exclude>org/junit/**/*</exclude>
+                        <!-- Not the org/ packages that are a part of the jdk -->
+                        <exclude>org/ietf/jgss/*</exclude>
+                        <exclude>org/omg/**/*</exclude>
+                        <exclude>org/w3c/dom/*</exclude>
+                        <exclude>org/w3c/dom/**/*</exclude>
+                        <exclude>org/xml/sax/*</exclude>
+                        <exclude>org/xml/sax/**/*</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>com/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.com.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                        <!-- Not the com/ packages that are a part of particular jdk implementations -->
+                        <exclude>com/sun/tools/*</exclude>
+                        <exclude>com/sun/javadoc/*</exclude>
+                        <exclude>com/sun/security/*</exclude>
+                        <exclude>com/sun/jndi/*</exclude>
+                        <exclude>com/sun/management/*</exclude>
+                        <exclude>com/sun/tools/**/*</exclude>
+                        <exclude>com/sun/javadoc/**/*</exclude>
+                        <exclude>com/sun/security/**/*</exclude>
+                        <exclude>com/sun/jndi/**/*</exclude>
+                        <exclude>com/sun/management/**/*</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>io/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.io.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                        <!-- Exclude config keys for Hadoop that look like package names -->
+                        <exclude>io/compression/*</exclude>
+                        <exclude>io/compression/**/*</exclude>
+                        <exclude>io/mapfile/*</exclude>
+                        <exclude>io/mapfile/**/*</exclude>
+                        <exclude>io/map/index/*</exclude>
+                        <exclude>io/seqfile/*</exclude>
+                        <exclude>io/seqfile/**/*</exclude>
+                        <exclude>io/file/buffer/size</exclude>
+                        <exclude>io/skip/checksum/errors</exclude>
+                        <exclude>io/sort/*</exclude>
+                        <exclude>io/serializations</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>javax/el/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.javax.el.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>javax/inject/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.javax.inject.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>javax/servlet/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.javax.servlet.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>net/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.net.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                        <!-- Exclude config keys for Hadoop that look like package names -->
+                        <exclude>net/topology/*</exclude>
+                        <exclude>net/topology/**/*</exclude>
+                      </excludes>
+                    </relocation>
+                  </relocations>
+                  <transformers>
+                    <!-- Needed until MSHADE-182 -->
+                    <transformer implementation="org.apache.hadoop.maven.plugin.shade.resource.ServicesResourceTransformer"/>
+                    <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
+                    <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
+                      <addHeader>false</addHeader>
+                    </transformer>
+                  </transformers>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>license-maven-plugin</artifactId>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>noshade</id>
+      <activation>
+        <property><name>skipShade</name></property>
+      </activation>
+      <build>
+        <plugins>
+          <!-- We contain no source -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-source-plugin</artifactId>
+              <configuration>
+                <skipSource>true</skipSource>
+              </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>license-maven-plugin</artifactId>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 
 </project>
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/85e4961f/hadoop-client-modules/hadoop-client-runtime/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-client-modules/hadoop-client-runtime/pom.xml b/hadoop-client-modules/hadoop-client-runtime/pom.xml
index aa1a54b..63250f8 100644
--- a/hadoop-client-modules/hadoop-client-runtime/pom.xml
+++ b/hadoop-client-modules/hadoop-client-runtime/pom.xml
@@ -105,214 +105,244 @@
       <optional>true</optional>
     </dependency>
   </dependencies>
-  <build>
-    <plugins>
-      <!-- We contain no source -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-source-plugin</artifactId>
-          <configuration>
-            <skipSource>true</skipSource>
-          </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-        <dependencies>
-          <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-maven-plugins</artifactId>
-            <version>${project.version}</version>
-          </dependency>
-        </dependencies>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-              <createSourceJar>true</createSourceJar>
-              <artifactSet>
-                <excludes>
-                  <!-- We need a filter that matches just those things that aer included in the api jar -->
-                  <exclude>org.apache.hadoop:hadoop-client-api</exclude>
-                  <!-- Leave HTrace as an unshaded dependency on purpose, since a static class member is used to trace within a given JVM instance -->
-                  <exclude>org.apache.htrace:htrace-core4</exclude>
-                  <!-- Leave slf4j unshaded so downstream users can configure logging. -->
-                  <exclude>org.slf4j:slf4j-api</exclude>
-                  <!-- Leave commons-logging unshaded so downstream users can configure logging. -->
-                  <exclude>commons-logging:commons-logging</exclude>
-                  <!-- Leave log4j unshaded so downstream users can configure logging. -->
-                  <exclude>log4j:log4j</exclude>
-                </excludes>
-              </artifactSet>
-              <filters>
-                <!-- We need a filter that matches just those things that are included in the api jar -->
-                <filter>
-                  <artifact>org.apache.hadoop:*</artifact>
-                  <excludes>
-                    <exclude>**/*</exclude>
-                    <exclude>*</exclude>
-                  </excludes>
-                </filter>
-                <!-- Some of our dependencies include source, so remove it. -->
-                <filter>
-                  <artifact>*:*</artifact>
-                  <excludes>
-                    <exclude>**/*.java</exclude>
-                  </excludes>
-                </filter>
-                <!-- We only want one copy of the Localizer class. So long as we keep jasper compiler and runtime on the same version, which one doesn't matter -->
-                <filter>
-                  <artifact>tomcat:jasper-compiler</artifact>
-                  <excludes>
-                    <exclude>org/apache/jasper/compiler/Localizer.class</exclude>
-                  </excludes>
-                </filter>
-                <!-- We only have xerces as a dependency for XML output for the fsimage edits, we don't need anything specific to it for javax xml support -->
-                <filter>
-                  <artifact>xerces:xercesImpl</artifact>
-                  <excludes>
-                    <exclude>META-INF/services/*</exclude>
-                  </excludes>
-                </filter>
-                <!-- We rely on jersey for our web interfaces. We want to use its java services stuff only internal to jersey -->
-                <filter>
-                  <artifact>com.sun.jersey:*</artifact>
-                  <excludes>
-                    <exclude>META-INF/services/javax.*</exclude>
-                  </excludes>
-                </filter>
-              </filters>
-              <relocations>
-                <relocation>
-                  <pattern>org/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.org.</shadedPattern>
-                  <excludes>
-                    <exclude>org/apache/hadoop/*</exclude>
-                    <exclude>org/apache/hadoop/**/*</exclude>
-                    <!-- Our non-shaded htrace and logging libraries -->
-                    <exclude>org/apache/htrace/*</exclude>
-                    <exclude>org/apache/htrace/**/*</exclude>
-                    <exclude>org/slf4j/*</exclude>
-                    <exclude>org/slf4j/**/*</exclude>
-                    <exclude>org/apache/commons/logging/*</exclude>
-                    <exclude>org/apache/commons/logging/**/*</exclude>
-                    <exclude>org/apache/log4j/*</exclude>
-                    <exclude>org/apache/log4j/**/*</exclude>
-                    <exclude>**/pom.xml</exclude>
-                    <!-- Not the org/ packages that are a part of the jdk -->
-                    <exclude>org/ietf/jgss/*</exclude>
-                    <exclude>org/omg/**/*</exclude>
-                    <exclude>org/w3c/dom/*</exclude>
-                    <exclude>org/w3c/dom/**/*</exclude>
-                    <exclude>org/xml/sax/*</exclude>
-                    <exclude>org/xml/sax/**/*</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>com/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.com.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                    <!-- Not the com/ packages that are a part of particular jdk implementations -->
-                    <exclude>com/sun/tools/*</exclude>
-                    <exclude>com/sun/javadoc/*</exclude>
-                    <exclude>com/sun/security/*</exclude>
-                    <exclude>com/sun/jndi/*</exclude>
-                    <exclude>com/sun/management/*</exclude>
-                    <exclude>com/sun/tools/**/*</exclude>
-                    <exclude>com/sun/javadoc/**/*</exclude>
-                    <exclude>com/sun/security/**/*</exclude>
-                    <exclude>com/sun/jndi/**/*</exclude>
-                    <exclude>com/sun/management/**/*</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>io/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.io.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                    <!-- Exclude config keys for Hadoop that look like package names -->
-                    <exclude>io/compression/*</exclude>
-                    <exclude>io/compression/**/*</exclude>
-                    <exclude>io/mapfile/*</exclude>
-                    <exclude>io/mapfile/**/*</exclude>
-                    <exclude>io/map/index/*</exclude>
-                    <exclude>io/seqfile/*</exclude>
-                    <exclude>io/seqfile/**/*</exclude>
-                    <exclude>io/file/buffer/size</exclude>
-                    <exclude>io/skip/checksum/errors</exclude>
-                    <exclude>io/sort/*</exclude>
-                    <exclude>io/serializations</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>javax/el/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.javax.el.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>javax/servlet/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.javax.servlet.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>net/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.net.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                    <!-- Exclude config keys for Hadoop that look like package names -->
-                    <exclude>net/topology/*</exclude>
-                    <exclude>net/topology/**/*</exclude>
-                  </excludes>
-                </relocation>
-                <!-- probably not. -->
-<!--
-                <relocation>
-                  <pattern>javax/</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.javax.</shadedPattern>
-                  <excludes>
-                    <exclude>**/pom.xml</exclude>
-                  </excludes>
-                </relocation>
--->
-              </relocations>
-              <transformers>
-                <!-- Needed until MSHADE-182 -->
-                <transformer implementation="org.apache.hadoop.maven.plugin.shade.resource.ServicesResourceTransformer"/>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
-                  <addHeader>false</addHeader>
-                </transformer>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
-                  <resource>META-INF/jboss-beans.xml</resource>
-                  <!-- Add this to enable loading of DTDs
-                  <ignoreDtd>false</ignoreDtd>
-                  -->
-                </transformer>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-                  <resource>META-INF/mailcap.default</resource>
-                </transformer>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-                  <resource>META-INF/mimetypes.default</resource>
-                </transformer>
-              </transformers>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>license-maven-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
+  <profiles>
+    <profile>
+      <id>shade</id>
+      <activation>
+        <property><name>!skipShade</name></property>
+      </activation>
+      <build>
+        <plugins>
+          <!-- We contain no source -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-source-plugin</artifactId>
+              <configuration>
+                <skipSource>true</skipSource>
+              </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-shade-plugin</artifactId>
+            <dependencies>
+              <dependency>
+                <groupId>org.apache.hadoop</groupId>
+                <artifactId>hadoop-maven-plugins</artifactId>
+                <version>${project.version}</version>
+              </dependency>
+            </dependencies>
+            <executions>
+              <execution>
+                <phase>package</phase>
+                <goals>
+                  <goal>shade</goal>
+                </goals>
+                <configuration>
+                  <createSourceJar>true</createSourceJar>
+                  <artifactSet>
+                    <excludes>
+                      <!-- We need a filter that matches just those things that aer included in the api jar -->
+                      <exclude>org.apache.hadoop:hadoop-client-api</exclude>
+                      <!-- Leave HTrace as an unshaded dependency on purpose, since a static class member is used to trace within a given JVM instance -->
+                      <exclude>org.apache.htrace:htrace-core4</exclude>
+                      <!-- Leave slf4j unshaded so downstream users can configure logging. -->
+                      <exclude>org.slf4j:slf4j-api</exclude>
+                      <!-- Leave commons-logging unshaded so downstream users can configure logging. -->
+                      <exclude>commons-logging:commons-logging</exclude>
+                      <!-- Leave log4j unshaded so downstream users can configure logging. -->
+                      <exclude>log4j:log4j</exclude>
+                    </excludes>
+                  </artifactSet>
+                  <filters>
+                    <!-- We need a filter that matches just those things that are included in the api jar -->
+                    <filter>
+                      <artifact>org.apache.hadoop:*</artifact>
+                      <excludes>
+                        <exclude>**/*</exclude>
+                        <exclude>*</exclude>
+                      </excludes>
+                    </filter>
+                    <!-- Some of our dependencies include source, so remove it. -->
+                    <filter>
+                      <artifact>*:*</artifact>
+                      <excludes>
+                        <exclude>**/*.java</exclude>
+                      </excludes>
+                    </filter>
+                    <!-- We only want one copy of the Localizer class. So long as we keep jasper compiler and runtime on the same version, which one doesn't matter -->
+                    <filter>
+                      <artifact>tomcat:jasper-compiler</artifact>
+                      <excludes>
+                        <exclude>org/apache/jasper/compiler/Localizer.class</exclude>
+                      </excludes>
+                    </filter>
+                    <!-- We only have xerces as a dependency for XML output for the fsimage edits, we don't need anything specific to it for javax xml support -->
+                    <filter>
+                      <artifact>xerces:xercesImpl</artifact>
+                      <excludes>
+                        <exclude>META-INF/services/*</exclude>
+                      </excludes>
+                    </filter>
+                    <!-- We rely on jersey for our web interfaces. We want to use its java services stuff only internal to jersey -->
+                    <filter>
+                      <artifact>com.sun.jersey:*</artifact>
+                      <excludes>
+                        <exclude>META-INF/services/javax.*</exclude>
+                      </excludes>
+                    </filter>
+                  </filters>
+                  <relocations>
+                    <relocation>
+                      <pattern>org/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.org.</shadedPattern>
+                      <excludes>
+                        <exclude>org/apache/hadoop/*</exclude>
+                        <exclude>org/apache/hadoop/**/*</exclude>
+                        <!-- Our non-shaded htrace and logging libraries -->
+                        <exclude>org/apache/htrace/*</exclude>
+                        <exclude>org/apache/htrace/**/*</exclude>
+                        <exclude>org/slf4j/*</exclude>
+                        <exclude>org/slf4j/**/*</exclude>
+                        <exclude>org/apache/commons/logging/*</exclude>
+                        <exclude>org/apache/commons/logging/**/*</exclude>
+                        <exclude>org/apache/log4j/*</exclude>
+                        <exclude>org/apache/log4j/**/*</exclude>
+                        <exclude>**/pom.xml</exclude>
+                        <!-- Not the org/ packages that are a part of the jdk -->
+                        <exclude>org/ietf/jgss/*</exclude>
+                        <exclude>org/omg/**/*</exclude>
+                        <exclude>org/w3c/dom/*</exclude>
+                        <exclude>org/w3c/dom/**/*</exclude>
+                        <exclude>org/xml/sax/*</exclude>
+                        <exclude>org/xml/sax/**/*</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>com/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.com.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                        <!-- Not the com/ packages that are a part of particular jdk implementations -->
+                        <exclude>com/sun/tools/*</exclude>
+                        <exclude>com/sun/javadoc/*</exclude>
+                        <exclude>com/sun/security/*</exclude>
+                        <exclude>com/sun/jndi/*</exclude>
+                        <exclude>com/sun/management/*</exclude>
+                        <exclude>com/sun/tools/**/*</exclude>
+                        <exclude>com/sun/javadoc/**/*</exclude>
+                        <exclude>com/sun/security/**/*</exclude>
+                        <exclude>com/sun/jndi/**/*</exclude>
+                        <exclude>com/sun/management/**/*</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>io/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.io.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                        <!-- Exclude config keys for Hadoop that look like package names -->
+                        <exclude>io/compression/*</exclude>
+                        <exclude>io/compression/**/*</exclude>
+                        <exclude>io/mapfile/*</exclude>
+                        <exclude>io/mapfile/**/*</exclude>
+                        <exclude>io/map/index/*</exclude>
+                        <exclude>io/seqfile/*</exclude>
+                        <exclude>io/seqfile/**/*</exclude>
+                        <exclude>io/file/buffer/size</exclude>
+                        <exclude>io/skip/checksum/errors</exclude>
+                        <exclude>io/sort/*</exclude>
+                        <exclude>io/serializations</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>javax/el/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.javax.el.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>javax/servlet/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.javax.servlet.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                      </excludes>
+                    </relocation>
+                    <relocation>
+                      <pattern>net/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.net.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                        <!-- Exclude config keys for Hadoop that look like package names -->
+                        <exclude>net/topology/*</exclude>
+                        <exclude>net/topology/**/*</exclude>
+                      </excludes>
+                    </relocation>
+                    <!-- probably not. -->
+    <!--
+                    <relocation>
+                      <pattern>javax/</pattern>
+                      <shadedPattern>${shaded.dependency.prefix}.javax.</shadedPattern>
+                      <excludes>
+                        <exclude>**/pom.xml</exclude>
+                      </excludes>
+                    </relocation>
+    -->
+                  </relocations>
+                  <transformers>
+                    <!-- Needed until MSHADE-182 -->
+                    <transformer implementation="org.apache.hadoop.maven.plugin.shade.resource.ServicesResourceTransformer"/>
+                    <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
+                    <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
+                      <addHeader>false</addHeader>
+                    </transformer>
+                    <transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
+                      <resource>META-INF/jboss-beans.xml</resource>
+                      <!-- Add this to enable loading of DTDs
+                      <ignoreDtd>false</ignoreDtd>
+                      -->
+                    </transformer>
+                    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                      <resource>META-INF/mailcap.default</resource>
+                    </transformer>
+                    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                      <resource>META-INF/mimetypes.default</resource>
+                    </transformer>
+                  </transformers>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>license-maven-plugin</artifactId>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>noshade</id>
+      <activation>
+        <property><name>skipShade</name></property>
+      </activation>
+      <build>
+        <plugins>
+          <!-- We contain no source -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-source-plugin</artifactId>
+              <configuration>
+                <skipSource>true</skipSource>
+              </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>license-maven-plugin</artifactId>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 
 </project>
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message