Created
May 12, 2014 16:47
-
-
Save prb/d776a47bd164f704eecb to your computer and use it in GitHub Desktop.
Fragment of a pom.xml file for packaging separate worker and driver JARs for Spark.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Fragment of pom.xml --> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-shade-plugin</artifactId> | |
<version>2.2</version> | |
<configuration> | |
<filters> | |
<filter> | |
<artifact>*:*</artifact> | |
<excludes> | |
<exclude>META-INF/*.SF</exclude> | |
<exclude>META-INF/*.DSA</exclude> | |
<exclude>META-INF/*.RSA</exclude> | |
</excludes> | |
</filter> | |
</filters> | |
</configuration> | |
<executions> | |
<execution> | |
<id>job-driver-jar</id> | |
<phase>package</phase> | |
<goals> | |
<goal>shade</goal> | |
</goals> | |
<configuration> | |
<shadedArtifactAttached>true</shadedArtifactAttached> | |
<shadedClassifierName>driver</shadedClassifierName> | |
<transformers> | |
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> | |
<!-- | |
Some care is required: | |
http://doc.akka.io/docs/akka/snapshot/general/configuration.html | |
--> | |
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> | |
<resource>reference.conf</resource> | |
</transformer> | |
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | |
<mainClass>foo.bar.SparkJobs</mainClass> | |
</transformer> | |
</transformers> | |
</configuration> | |
</execution> | |
<execution> | |
<id>worker-library-jar</id> | |
<phase>package</phase> | |
<goals> | |
<goal>shade</goal> | |
</goals> | |
<configuration> | |
<shadedArtifactAttached>true</shadedArtifactAttached> | |
<shadedClassifierName>worker</shadedClassifierName> | |
<artifactSet> | |
<includes> | |
<!-- Fill in what you'd need here. --> | |
<include>com.fasterxml.jackson.core:*</include> | |
<include>com.fasterxml.jackson.datatype:*</include> | |
<include>com.fasterxml.jackson.module:*</include> | |
<include>org.joda:joda-convert</include> | |
<include>joda-time:joda-time</include> | |
</includes> | |
</artifactSet> | |
<transformers> | |
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> | |
</transformers> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment