Skip to content

Commit

Permalink
[#360] fix jar for embedded mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bamthomas committed Mar 6, 2020
1 parent 9661582 commit dfcb7e8
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 44 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION = $(shell cat pom.xml | grep '<version>[0-9.]\+' | sed 's/<version>\([0-9.]\+\)<\/version>/\1/g' | tr -d '[:space:]')
DIST_TARGET=datashare-dist/target/datashare-dist-$(VERSION)-all
DIST_TARGET=datashare-dist/target/datashare-dist-$(VERSION)-docker
PATH_TO_APP_DIST=../datashare-client/dist/

$(DIST_TARGET): dist
Expand Down
29 changes: 1 addition & 28 deletions datashare-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,34 +83,6 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<shadedClassifierName>all</shadedClassifierName>
<shadedArtifactAttached>true</shadedArtifactAttached>
<transformers>
<!--remove models from jar see mitie -->
<transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
<resource>.dat</resource>
</transformer>
</transformers>
<artifactSet>
<excludes>
<exclude>log4j:log4j:jar:</exclude>
</excludes>
</artifactSet>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
Expand All @@ -123,6 +95,7 @@
<configuration>
<descriptors>
<descriptor>src/assembly/all.xml</descriptor>
<descriptor>src/assembly/docker.xml</descriptor>
</descriptors>
</configuration>
</execution>
Expand Down
26 changes: 11 additions & 15 deletions datashare-dist/src/assembly/all.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
<assembly>
<id>all</id>
<formats>
<format>dir</format>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}/src/main/docker</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>*</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory>lib</outputDirectory>

<dependencySets>
<dependencySet>
<includes>
<include>*.jar</include>
<include>*:jar:*</include>
</includes>
</fileSet>
</fileSets>
<outputDirectory>/</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<useTransitiveDependencies>false</useTransitiveDependencies>
<unpack>true</unpack>
</dependencySet>
</dependencySets>
</assembly>
23 changes: 23 additions & 0 deletions datashare-dist/src/assembly/docker.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<assembly>
<id>docker</id>
<formats>
<format>dir</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}/src/main/docker</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>*</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory>lib</outputDirectory>
<includes>
<include>*.jar</include>
</includes>
</fileSet>
</fileSets>
</assembly>

0 comments on commit dfcb7e8

Please sign in to comment.