Skip to content
This repository was archived by the owner on Oct 8, 2020. It is now read-only.

Commit 2694b2b

Browse files
Generate Shell script for CLI execution.
1 parent c85c705 commit 2694b2b

File tree

3 files changed

+106
-25
lines changed

3 files changed

+106
-25
lines changed

sansa-inference-spark/pom.xml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,5 +395,72 @@
395395
</properties>
396396
</profile>
397397

398+
<profile>
399+
<id>package</id>
400+
<build>
401+
<plugins>
402+
<plugin>
403+
<artifactId>maven-assembly-plugin</artifactId>
404+
<version>3.0.0</version>
405+
<configuration>
406+
<descriptors>
407+
<descriptor>src/assembly/assembly-bin.xml</descriptor>
408+
</descriptors>
409+
</configuration>
410+
<executions>
411+
<execution>
412+
<id>make-assembly</id> <!-- this is used for inheritance merges -->
413+
<phase>package</phase> <!-- bind to the packaging phase -->
414+
<goals>
415+
<goal>single</goal>
416+
</goals>
417+
</execution>
418+
</executions>
419+
</plugin>
420+
<plugin>
421+
<artifactId>maven-resources-plugin</artifactId>
422+
<version>3.0.2</version>
423+
<executions>
424+
<execution>
425+
<id>copy-resources</id>
426+
<!-- here the phase you need -->
427+
<phase>prepare-package</phase>
428+
<goals>
429+
<goal>copy-resources</goal>
430+
</goals>
431+
<configuration>
432+
<outputDirectory>${basedir}/target/scripts</outputDirectory>
433+
<resources>
434+
<resource>
435+
<directory>scripts</directory>
436+
<filtering>true</filtering>
437+
</resource>
438+
</resources>
439+
</configuration>
440+
</execution>
441+
</executions>
442+
</plugin>
443+
<plugin>
444+
<artifactId>maven-antrun-plugin</artifactId>
445+
<executions>
446+
<execution>
447+
<phase>prepare-package</phase>
448+
<configuration>
449+
<tasks>
450+
<replace token="VERSION_TMP" value="dist-${project.artifactId}-${project.version}.jar" dir="target/scripts">
451+
<include name="cli"/>
452+
</replace>
453+
</tasks>
454+
</configuration>
455+
<goals>
456+
<goal>run</goal>
457+
</goals>
458+
</execution>
459+
</executions>
460+
</plugin>
461+
</plugins>
462+
</build>
463+
</profile>
464+
398465
</profiles>
399466
</project>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
4+
<id>bin</id>
5+
<formats>
6+
<format>tar.gz</format>
7+
<!--<format>tar.bz2</format>-->
8+
<!--<format>zip</format>-->
9+
</formats>
10+
<fileSets>
11+
<fileSet>
12+
<directory>${project.basedir}</directory>
13+
<outputDirectory>/</outputDirectory>
14+
<includes>
15+
<include>README*</include>
16+
<include>LICENSE*</include>
17+
<include>NOTICE*</include>
18+
</includes>
19+
</fileSet>
20+
<fileSet>
21+
<directory>${project.build.directory}</directory>
22+
<outputDirectory>/lib</outputDirectory>
23+
<includes>
24+
<include>*.jar</include>
25+
</includes>
26+
</fileSet>
27+
<fileSet>
28+
<directory>${project.build.directory}/scripts</directory>
29+
<outputDirectory>/bin</outputDirectory>
30+
<includes>
31+
<include>cli</include>
32+
</includes>
33+
</fileSet>
34+
<fileSet>
35+
<directory>${project.build.directory}/site</directory>
36+
<outputDirectory>docs</outputDirectory>
37+
</fileSet>
38+
</fileSets>
39+
</assembly>

sansa-inference-spark/src/main/assembly/assembly.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)