openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1776929 - /openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/meecrowave-maven/index.adoc
Date Mon, 02 Jan 2017 13:40:43 GMT
Author: rmannibucau
Date: Mon Jan  2 13:40:43 2017
New Revision: 1776929

URL: http://svn.apache.org/viewvc?rev=1776929&view=rev
Log:
adding a word on maven shade plugin

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/meecrowave-maven/index.adoc

Modified: openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/meecrowave-maven/index.adoc
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/meecrowave-maven/index.adoc?rev=1776929&r1=1776928&r2=1776929&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/meecrowave-maven/index.adoc
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/meecrowave-maven/index.adoc
Mon Jan  2 13:40:43 2017
@@ -23,3 +23,80 @@ TIP: most of the configuration is inheri
 Here are the available options (see core configuration for the details):
 
 include::../../../../../target/generated-doc/MavenConfiguration.adoc[]
+
+
+== Shading
+
+Plain Maven shade plugin enables you to build fatjar with Maven.
+
+Points to take care are:
+
+1. merge CXF resources
+2. merge Log4j2 resources
+3. merge OpenWebBeans resources
+4. merge SPI files (META-INF/services)
+5. ensure signatures are still valid in the aggregated jar
+
+[source,xml]
+----
+<plugin>
+  <groupId>org.apache.maven.plugins</groupId>
+  <artifactId>maven-shade-plugin</artifactId>
+  <version>2.4.3</version>
+  <executions>
+    <execution>
+      <id>bundle</id>
+      <phase>package</phase>
+      <goals>
+        <goal>shade</goal>
+      </goals>
+      <configuration>
+        <shadedClassifierName>fat</shadedClassifierName>
+        <shadedArtifactAttached>true</shadedArtifactAttached>
+        <dependencyReducedPomLocation>${project.build.directory}/reduced-pom-bundle.xml</dependencyReducedPomLocation>
+        <transformers>
+          <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+            <mainClass>org.apache.meecrowave.runner.Cli</mainClass>
+          </transformer>
+          <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+            <resource>META-INF/cxf/bus-extensions.txt</resource>
+          </transformer>
+          <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+            <resource>log4j2.component.properties</resource>
+          </transformer>
+          <transformer
+              implementation="com.github.edwgiz.mavenShadePlugin.log4j2CacheTransformer.PluginsCacheFileTransformer"/>
+          <transformer implementation="org.apache.openwebbeans.maven.shade.OpenWebBeansPropertiesTransformer"/>
+          <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+        </transformers>
+        <filters>
+          <filter>
+            <artifact>*:*</artifact>
+            <excludes>
+              <exclude>META-INF/*.SF</exclude>
+              <exclude>META-INF/*.DSA</exclude>
+              <exclude>META-INF/*.RSA</exclude>
+              <exclude>META-INF/LICENSE.txt</exclude>
+              <exclude>META-INF/LICENSE</exclude>
+              <exclude>META-INF/NOTICE.txt</exclude>
+              <exclude>META-INF/NOTICE</exclude>
+            </excludes>
+          </filter>
+        </filters>
+      </configuration>
+    </execution>
+  </executions>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.openwebbeans</groupId>
+      <artifactId>openwebbeans-maven</artifactId>
+      <version>1.7.0</version>
+    </dependency>
+    <dependency>
+      <groupId>com.github.edwgiz</groupId>
+      <artifactId>maven-shade-plugin.log4j2-cachefile-transformer</artifactId>
+      <version>2.1</version>
+    </dependency>
+  </dependencies>
+</plugin>
+----



Mime
View raw message