|
@@ -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>
|
|
|
|