Skip to content

Commit dd1256b

Browse files
committed
Merge remote-tracking branch 'apache/master' into SPARK-4586
2 parents fc59a02 + eeb53bf commit dd1256b

File tree

17 files changed

+748
-221
lines changed

17 files changed

+748
-221
lines changed

assembly/pom.xml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@
4343
</properties>
4444

4545
<dependencies>
46-
<!-- Promote Guava to compile scope in this module so it's included while shading. -->
47-
<dependency>
48-
<groupId>com.google.guava</groupId>
49-
<artifactId>guava</artifactId>
50-
<scope>compile</scope>
51-
</dependency>
5246
<dependency>
5347
<groupId>org.apache.spark</groupId>
5448
<artifactId>spark-core_${scala.binary.version}</artifactId>
@@ -133,22 +127,6 @@
133127
<goal>shade</goal>
134128
</goals>
135129
<configuration>
136-
<relocations>
137-
<relocation>
138-
<pattern>com.google</pattern>
139-
<shadedPattern>org.spark-project.guava</shadedPattern>
140-
<includes>
141-
<include>com.google.common.**</include>
142-
</includes>
143-
<excludes>
144-
<exclude>com/google/common/base/Absent*</exclude>
145-
<exclude>com/google/common/base/Function</exclude>
146-
<exclude>com/google/common/base/Optional*</exclude>
147-
<exclude>com/google/common/base/Present*</exclude>
148-
<exclude>com/google/common/base/Supplier</exclude>
149-
</excludes>
150-
</relocation>
151-
</relocations>
152130
<transformers>
153131
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
154132
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">

core/pom.xml

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,6 @@
106106
<groupId>org.eclipse.jetty</groupId>
107107
<artifactId>jetty-server</artifactId>
108108
</dependency>
109-
<!--
110-
Promote Guava to "compile" so that maven-shade-plugin picks it up (for packaging the Optional
111-
class exposed in the Java API). The plugin will then remove this dependency from the published
112-
pom, so that Guava does not pollute the client's compilation classpath.
113-
-->
114-
<dependency>
115-
<groupId>com.google.guava</groupId>
116-
<artifactId>guava</artifactId>
117-
<scope>compile</scope>
118-
</dependency>
119109
<dependency>
120110
<groupId>org.apache.commons</groupId>
121111
<artifactId>commons-lang3</artifactId>
@@ -350,44 +340,6 @@
350340
<verbose>true</verbose>
351341
</configuration>
352342
</plugin>
353-
<plugin>
354-
<groupId>org.apache.maven.plugins</groupId>
355-
<artifactId>maven-shade-plugin</artifactId>
356-
<executions>
357-
<execution>
358-
<phase>package</phase>
359-
<goals>
360-
<goal>shade</goal>
361-
</goals>
362-
<configuration>
363-
<shadedArtifactAttached>false</shadedArtifactAttached>
364-
<artifactSet>
365-
<includes>
366-
<include>com.google.guava:guava</include>
367-
</includes>
368-
</artifactSet>
369-
<filters>
370-
<!-- See comment in the guava dependency declaration above. -->
371-
<filter>
372-
<artifact>com.google.guava:guava</artifact>
373-
<includes>
374-
<include>com/google/common/base/Absent*</include>
375-
<include>com/google/common/base/Function</include>
376-
<include>com/google/common/base/Optional*</include>
377-
<include>com/google/common/base/Present*</include>
378-
<include>com/google/common/base/Supplier</include>
379-
</includes>
380-
</filter>
381-
</filters>
382-
</configuration>
383-
</execution>
384-
</executions>
385-
</plugin>
386-
<!--
387-
Copy guava to the build directory. This is needed to make the SPARK_PREPEND_CLASSES
388-
option work in compute-classpath.sh, since it would put the non-shaded Spark classes in
389-
the runtime classpath.
390-
-->
391343
<plugin>
392344
<groupId>org.apache.maven.plugins</groupId>
393345
<artifactId>maven-dependency-plugin</artifactId>

examples/pom.xml

Lines changed: 34 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@
3535
<url>http://spark.apache.org/</url>
3636

3737
<dependencies>
38-
<!-- Promote Guava to compile scope in this module so it's included while shading. -->
39-
<dependency>
40-
<groupId>com.google.guava</groupId>
41-
<artifactId>guava</artifactId>
42-
<scope>compile</scope>
43-
</dependency>
4438
<dependency>
4539
<groupId>org.apache.spark</groupId>
4640
<artifactId>spark-core_${scala.binary.version}</artifactId>
@@ -310,69 +304,40 @@
310304
<plugin>
311305
<groupId>org.apache.maven.plugins</groupId>
312306
<artifactId>maven-shade-plugin</artifactId>
313-
<executions>
314-
<execution>
315-
<phase>package</phase>
316-
<goals>
317-
<goal>shade</goal>
318-
</goals>
319-
<configuration>
320-
<shadedArtifactAttached>false</shadedArtifactAttached>
321-
<outputFile>${project.build.directory}/scala-${scala.binary.version}/spark-examples-${project.version}-hadoop${hadoop.version}.jar</outputFile>
322-
<artifactSet>
323-
<includes>
324-
<include>*:*</include>
325-
</includes>
326-
</artifactSet>
327-
<filters>
328-
<filter>
329-
<artifact>com.google.guava:guava</artifact>
330-
<excludes>
331-
<!--
332-
Exclude all Guava classes so they're picked up from the main assembly. The
333-
dependency still needs to be compile-scoped so that the relocation below
334-
works.
335-
-->
336-
<exclude>**</exclude>
337-
</excludes>
338-
</filter>
339-
<filter>
340-
<artifact>*:*</artifact>
341-
<excludes>
342-
<exclude>META-INF/*.SF</exclude>
343-
<exclude>META-INF/*.DSA</exclude>
344-
<exclude>META-INF/*.RSA</exclude>
345-
</excludes>
346-
</filter>
347-
</filters>
348-
<relocations>
349-
<relocation>
350-
<pattern>com.google</pattern>
351-
<shadedPattern>org.spark-project.guava</shadedPattern>
352-
<includes>
353-
<include>com.google.common.**</include>
354-
</includes>
355-
<excludes>
356-
<exclude>com.google.common.base.Optional**</exclude>
357-
</excludes>
358-
</relocation>
359-
<relocation>
360-
<pattern>org.apache.commons.math3</pattern>
361-
<shadedPattern>org.spark-project.commons.math3</shadedPattern>
362-
</relocation>
363-
</relocations>
364-
<transformers>
365-
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
366-
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
367-
<resource>reference.conf</resource>
368-
</transformer>
369-
<transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
370-
<resource>log4j.properties</resource>
371-
</transformer>
372-
</transformers>
373-
</configuration>
374-
</execution>
375-
</executions>
307+
<configuration>
308+
<shadedArtifactAttached>false</shadedArtifactAttached>
309+
<outputFile>${project.build.directory}/scala-${scala.binary.version}/spark-examples-${project.version}-hadoop${hadoop.version}.jar</outputFile>
310+
<artifactSet>
311+
<includes>
312+
<include>*:*</include>
313+
</includes>
314+
</artifactSet>
315+
<filters>
316+
<filter>
317+
<artifact>*:*</artifact>
318+
<excludes>
319+
<exclude>META-INF/*.SF</exclude>
320+
<exclude>META-INF/*.DSA</exclude>
321+
<exclude>META-INF/*.RSA</exclude>
322+
</excludes>
323+
</filter>
324+
</filters>
325+
<relocations combine.children="append">
326+
<relocation>
327+
<pattern>org.apache.commons.math3</pattern>
328+
<shadedPattern>org.spark-project.commons.math3</shadedPattern>
329+
</relocation>
330+
</relocations>
331+
<transformers>
332+
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
333+
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
334+
<resource>reference.conf</resource>
335+
</transformer>
336+
<transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
337+
<resource>log4j.properties</resource>
338+
</transformer>
339+
</transformers>
340+
</configuration>
376341
</plugin>
377342
</plugins>
378343
</build>

0 commit comments

Comments
 (0)