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

This commit is contained in:
Steve Loughran 2017-01-19 11:49:40 +00:00
parent ed33ce11dd
commit 85e4961f60
4 changed files with 741 additions and 622 deletions

View File

@ -68,6 +68,12 @@
</exclusions>
</dependency>
</dependencies>
<profiles>
<profile>
<id>shade</id>
<activation>
<property><name>!skipShade</name></property>
</activation>
<build>
<plugins>
<!-- We contain no source -->
@ -212,5 +218,29 @@
</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>

View File

@ -32,21 +32,6 @@
</properties>
<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>
@ -68,6 +53,29 @@
<scope>test</scope>
</dependency>
</dependencies>
<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
@ -125,6 +133,27 @@
</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>

View File

@ -542,6 +542,12 @@
<!-- skipping guice-servlet because it's above -->
<!-- skipping io.netty:netty because it's in client -->
</dependencies>
<profiles>
<profile>
<id>shade</id>
<activation>
<property><name>!skipShade</name></property>
</activation>
<build>
<plugins>
<!-- We contain no source -->
@ -740,6 +746,30 @@
</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>

View File

@ -105,6 +105,12 @@
<optional>true</optional>
</dependency>
</dependencies>
<profiles>
<profile>
<id>shade</id>
<activation>
<property><name>!skipShade</name></property>
</activation>
<build>
<plugins>
<!-- We contain no source -->
@ -313,6 +319,30 @@
</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>