Skip to content

Commit a9cccac

Browse files
committed
use shade plugin for creating cli uber jar
1 parent 175cf78 commit a9cccac

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

cli/pom.xml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,35 @@
7878
</compilerArgs>
7979
</configuration>
8080
</plugin>
81-
81+
<plugin>
82+
<groupId>org.apache.maven.plugins</groupId>
83+
<artifactId>maven-shade-plugin</artifactId>
84+
<version>3.2.3</version>
85+
<executions>
86+
<execution>
87+
<phase>package</phase>
88+
<goals>
89+
<goal>shade</goal>
90+
</goals>
91+
</execution>
92+
</executions>
93+
<configuration>
94+
<transformers>
95+
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
96+
<manifestEntries>
97+
<Main-Class>io.openepcis.epc.eventhash.main.HashGenerator</Main-Class>
98+
<Specification-Title>${project.artifactId}</Specification-Title>
99+
<Specification-Version>${project.version}</Specification-Version>
100+
<Implementation-Title>${project.artifactId}</Implementation-Title>
101+
<Implementation-Version>${project.version}</Implementation-Version>
102+
<Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
103+
</manifestEntries>
104+
</transformer>
105+
</transformers>
106+
<finalName>${project.artifactId}-${project.version}-jar-with-dependencies</finalName>
107+
</configuration>
108+
</plugin>
109+
<!--
82110
<plugin>
83111
<groupId>org.apache.maven.plugins</groupId>
84112
<artifactId>maven-assembly-plugin</artifactId>
@@ -104,6 +132,7 @@
104132
</archive>
105133
</configuration>
106134
</plugin>
135+
-->
107136
</plugins>
108137
</build>
109138
<profiles>

0 commit comments

Comments
 (0)