Skip to content

Commit

Permalink
Merge pull request #89 from spdx/issue88
Browse files Browse the repository at this point in the history
Change maven assembly to shade for jar-with-dependencies
  • Loading branch information
goneall authored Oct 31, 2022
2 parents a160840 + 422d9dd commit 3a14324
Showing 1 changed file with 37 additions and 23 deletions.
60 changes: 37 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,28 +198,6 @@
<optimize>true</optimize>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>org.spdx.tools.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down Expand Up @@ -256,6 +234,42 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>jar-with-dependencies</shadedClassifierName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.spdx.tools.Main</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<!-- Some jars are signed but shading breaks that.
Don't include signing files.
-->
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<!--<phase /><!- - Switch off -->
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.spdx</groupId>
<artifactId>spdx-maven-plugin</artifactId>
Expand All @@ -270,7 +284,7 @@
</execution>
</executions>
<configuration>
<spdxDocumentNamespace>http://spdx.org/documents/tools-java-{$version}</spdxDocumentNamespace>
<spdxDocumentNamespace>http://spdx.org/documents/tools-java-${project.version}</spdxDocumentNamespace>
<defaultFileCopyright>Copyright (c) 2020 Source Auditor Inc.</defaultFileCopyright>
<defaultFileContributors>
<param>Gary O'Neall</param>
Expand Down

0 comments on commit 3a14324

Please sign in to comment.