You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2022/04/09 17:48:29 UTC

[isis] 01/03: ISIS-2445: less Maven Shade Plugin warnings

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 6c7274783a7a9dd4c33e6a3120882e6b3ef12cb3
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sat Apr 9 19:47:36 2022 +0200

    ISIS-2445: less Maven Shade Plugin warnings
---
 tooling/cli/pom.xml | 47 ++++++++++++++---------------------------------
 1 file changed, 14 insertions(+), 33 deletions(-)

diff --git a/tooling/cli/pom.xml b/tooling/cli/pom.xml
index b1129dab30..53111369ca 100644
--- a/tooling/cli/pom.xml
+++ b/tooling/cli/pom.xml
@@ -32,38 +32,10 @@
 
 	<build>
 		<plugins>
-<!--
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-assembly-plugin</artifactId>
-				<executions>
-					<execution>
-						<phase>package</phase>
-						<goals>
-							<goal>single</goal>
-						</goals>
-						<configuration>
-							<finalName>isis-tooling-cli</finalName>
-							<archive>
-								<manifest>
-									<mainClass>
-										org.apache.isis.tooling.cli.Cli
-									</mainClass>
-								</manifest>
-							</archive>
-							<descriptorRefs>
-								<descriptorRef>jar-with-dependencies</descriptorRef>
-							</descriptorRefs>
-							<appendAssemblyId>false</appendAssemblyId>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
--->
+
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-shade-plugin</artifactId>
-				<version>3.3.0</version>
 				<executions>
 					<execution>
 						<id>shade-my-jar</id>
@@ -72,17 +44,30 @@
 							<goal>shade</goal>
 						</goals>
 						<configuration>
+							<!-- avoids warnings 
+								https://stackoverflow.com/questions/8880361/superfluous-warnings-when-using-maven-shade-plugin-->
+						 	<forceCreation>true</forceCreation> 
 							<transformers>
 								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
 									<mainClass>org.apache.isis.tooling.cli.Cli</mainClass>
 								</transformer>
+								<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+								<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                  					<resource>META-INF/spring.schemas</resource>
+                  					<resource>META-INF/LICENSE.*</resource>
+                				</transformer>
 							</transformers>
 							<finalName>isis-tooling-cli</finalName>
 							<filters>
 								<filter>
 									<artifact>*:*</artifact>
+									<includes>
+										<include>META-INF/services</include>
+									</includes>
 									<excludes>
 										<exclude>**/Log4j2Plugins.dat</exclude>
+										<exclude>module-info.class</exclude>
+										<exclude>META-INF</exclude>
 									</excludes>
 								</filter>
 							</filters>
@@ -131,12 +116,8 @@
 			<artifactId>picocli</artifactId>
 		</dependency>
 
-
-
 	</dependencies>
 
-
-
 </project>