From c8898d65418529ed20bd2d9b46426c5977be34a1 Mon Sep 17 00:00:00 2001
From: Martin Goik <goik@hdm-stuttgart.de>
Date: Mon, 22 Mar 2021 23:07:08 +0100
Subject: [PATCH] Executable Jar in HelloWorld sample

---
 .../mi-maven-archetype-helloworld/pom.xml     |  2 +-
 .../resources/archetype-resources/pom.xml     | 25 +++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/ws/Archetypes/mi-maven-archetype-helloworld/pom.xml b/ws/Archetypes/mi-maven-archetype-helloworld/pom.xml
index c044519aa..9eaccc631 100644
--- a/ws/Archetypes/mi-maven-archetype-helloworld/pom.xml
+++ b/ws/Archetypes/mi-maven-archetype-helloworld/pom.xml
@@ -5,7 +5,7 @@
 
   <groupId>de.hdm_stuttgart.mi</groupId>
   <artifactId>mi-maven-archetype-helloworld</artifactId>
-  <version>1.4</version>
+  <version>1.5</version>
 
   <packaging>maven-archetype</packaging>
 
diff --git a/ws/Archetypes/mi-maven-archetype-helloworld/src/main/resources/archetype-resources/pom.xml b/ws/Archetypes/mi-maven-archetype-helloworld/src/main/resources/archetype-resources/pom.xml
index 94d9ef6c9..8d9a93608 100644
--- a/ws/Archetypes/mi-maven-archetype-helloworld/src/main/resources/archetype-resources/pom.xml
+++ b/ws/Archetypes/mi-maven-archetype-helloworld/src/main/resources/archetype-resources/pom.xml
@@ -48,6 +48,31 @@
         <artifactId>maven-site-plugin</artifactId>
         <version>3.9.1</version>
       </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>3.2.4</version>
+        <configuration>
+          <transformers>
+            <transformer
+                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+              <manifestEntries>
+                <Main-Class>${package}.App</Main-Class>
+                <Multi-Release>true</Multi-Release>
+              </manifestEntries>
+            </transformer>
+          </transformers>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>
-- 
GitLab