File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed
Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 3636 <spark .jar.dir>scala-${scala.binary.version} </spark .jar.dir>
3737 <spark .jar.basename>spark-assembly-${project.version} -hadoop${hadoop.version} .jar</spark .jar.basename>
3838 <spark .jar>${project.build.directory} /${spark.jar.dir} /${spark.jar.basename} </spark .jar>
39+ <spark .shaded.dir>${project.build.directory} /${spark.jar.dir} /shaded</spark .shaded.dir>
40+ <spark .shaded.jar>${spark.shaded.dir} /${spark.jar.basename} </spark .shaded.jar>
41+ <spark .shaded.unjar>${spark.shaded.dir} /unjar</spark .shaded.unjar>
3942 </properties >
4043
4144 <dependencies >
243246 <parquet .deps.scope>provided</parquet .deps.scope>
244247 </properties >
245248 </profile >
249+ <!-- Profiles that enable repackaging assembly jar. -->
250+ <profile >
251+ <id >repackage</id >
252+ <build >
253+ <plugins >
254+ <plugin >
255+ <artifactId >maven-antrun-plugin</artifactId >
256+ <executions >
257+ <execution >
258+ <id >java6-package</id >
259+ <phase >package</phase >
260+ <goals >
261+ <goal >run</goal >
262+ </goals >
263+ <configuration >
264+ <tasks if =" jar.tool" >
265+ <mkdir dir =" ${spark.shaded.unjar}" />
266+ <echo message =" Unjar ${spark.jar} to ${spark.shaded.unjar}" />
267+ <unzip src =" ${spark.jar}" dest =" ${spark.shaded.unjar}" />
268+ <echo message =" move original ${spark.jar} to ${spark.shaded.jar} ." />
269+ <copy file =" ${spark.jar}" tofile =" ${spark.shaded.jar}" />
270+ <echo message =" Jar file to ${spark.jar} -C ${spark.shaded.unjar} . with tool ${jar.tool}" />
271+ <exec executable =" ${jar.tool}" >
272+ <arg value =" cf" />
273+ <arg value =" ${spark.jar}" />
274+ <arg value =" -C" />
275+ <arg value =" ${spark.shaded.unjar}" />
276+ <arg value =" ." />
277+ </exec >
278+ <delete dir =" ${spark.shaded.unjar}" />
279+ </tasks >
280+ </configuration >
281+ </execution >
282+ </executions >
283+ </plugin >
284+ </plugins >
285+ </build >
286+ </profile >
246287 </profiles >
247288</project >
Original file line number Diff line number Diff line change 2323fi
2424export JAVA_HOME=$JAVA_HOME
2525
26- ./make-distribution.sh --skip-java-test $( cat SHOPIFY_HADOOP_OPTIONS)
26+ ./make-distribution.sh --skip-java-test $( cat SHOPIFY_HADOOP_OPTIONS) -Prepackage -Djar.tool=/u/apps/packserv/java_alt/bin/jar
2727
2828if [ " $? " != " 0" ] || [ -e " $FWDIR /lib/spark-assembly*hadoop*.jar" ]; then
2929 echo " Failed to make spark distro using sbt."
You can’t perform that action at this time.
0 commit comments