You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2010/08/08 12:40:36 UTC

svn commit: r983378 - in /maven/plugins/trunk/maven-shade-plugin/src/site/apt: examples/includes-excludes.apt.vm usage.apt.vm

Author: bentmann
Date: Sun Aug  8 10:40:36 2010
New Revision: 983378

URL: http://svn.apache.org/viewvc?rev=983378&view=rev
Log:
o Polished docs

Modified:
    maven/plugins/trunk/maven-shade-plugin/src/site/apt/examples/includes-excludes.apt.vm
    maven/plugins/trunk/maven-shade-plugin/src/site/apt/usage.apt.vm

Modified: maven/plugins/trunk/maven-shade-plugin/src/site/apt/examples/includes-excludes.apt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/site/apt/examples/includes-excludes.apt.vm?rev=983378&r1=983377&r2=983378&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/site/apt/examples/includes-excludes.apt.vm (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/site/apt/examples/includes-excludes.apt.vm Sun Aug  8 10:40:36 2010
@@ -121,3 +121,33 @@ Selecting Contents for Uber JAR
   should be included in the uber JAR. The second filter demonstrates the use of wildcards for the artifact identity which
   was introduced in plugin version 1.3. It excludes all signature related files from every artifact, regardless of its
   group or artifact id.
+
+  Besides user-specified filters, the plugin can also be configured to automatically remove all classes of dependencies
+  that are not used by the project, thereby minimizing the resulting uber JAR:
+
++-----
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <minimizeJar>true</minimizeJar>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  ...
+</project>
++-----

Modified: maven/plugins/trunk/maven-shade-plugin/src/site/apt/usage.apt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/site/apt/usage.apt.vm?rev=983378&r1=983377&r2=983378&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/site/apt/usage.apt.vm (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/site/apt/usage.apt.vm Sun Aug  8 10:40:36 2010
@@ -48,6 +48,14 @@ mvn package
         <configuration>
           <!-- put your configurations here -->
         </configuration>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+          </execution>
+        </executions>
       </plugin>
     </plugins>
   </build>