You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ma...@apache.org on 2007/10/04 13:22:56 UTC

svn commit: r581854 - in /maven/sandbox/trunk/plugins/maven-shade-plugin/src/site: ./ apt/ apt/examples.apt apt/index.apt apt/usage.apt site.xml

Author: mauro
Date: Thu Oct  4 04:22:55 2007
New Revision: 581854

URL: http://svn.apache.org/viewvc?rev=581854&view=rev
Log:
Added site docs.

Added:
    maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/
    maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/
    maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/examples.apt
    maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/index.apt
    maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/usage.apt
    maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/site.xml

Added: maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/examples.apt
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/examples.apt?rev=581854&view=auto
==============================================================================
--- maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/examples.apt (added)
+++ maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/examples.apt Thu Oct  4 04:22:55 2007
@@ -0,0 +1,205 @@
+ ------
+ Maven 2 Shade Plugin
+ ------
+ Mauro Talevi
+ ------
+~~ Copyright 2007 The Apache Software Foundation.
+~~
+~~ Licensed under the Apache License, Version 2.0 (the "License");
+~~ you may not use this file except in compliance with the License.
+~~ You may obtain a copy of the License at
+~~
+~~      http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+ * Shade Plugin with no relocation
+
++-----
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <artifactSet>
+                <excludes>
+                  <exclude>classworlds:classworlds</exclude>
+                  <exclude>junit:junit</exclude>
+                  <exclude>jmock:jmock</exclude>
+                  <exclude>xml-apis:xml-apis</exclude>
+                </excludes>
+              </artifactSet>
+              <transformers>
+                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
+              </transformers>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  ...
+</project>
++-----
+
+ * Shade Plugin with shaded relocation
+
++-----
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <artifactSet>
+                <excludes>
+                  <exclude>classworlds:classworlds</exclude>
+                  <exclude>junit:junit</exclude>
+                  <exclude>jmock:jmock</exclude>
+                  <exclude>xml-apis:xml-apis</exclude>
+                </excludes>
+              </artifactSet>              
+			  <relocations>
+                <relocation>
+                  <pattern>org.codehaus.plexus.util</pattern>
+                  <shadedPattern>org.shaded.plexus.util</shadedPattern>
+                  <excludes>
+                    <exclude>org.codehaus.plexus.util.xml.Xpp3Dom</exclude>
+                    <exclude>org.codehaus.plexus.util.xml.pull.*</exclude>
+                  </excludes>
+                </relocation>
+              </relocations>              
+              <transformers>
+                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
+              </transformers>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  ...
+</project>
++-----
+
+ * Shade Plugin with renamed but unattached artifact
+
++-----
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <shadedArtifactId>shaded-artifact</shadedArtifactId>
+              <artifactSet>
+                <excludes>
+                  <exclude>classworlds:classworlds</exclude>
+                  <exclude>junit:junit</exclude>
+                  <exclude>jmock:jmock</exclude>
+                  <exclude>xml-apis:xml-apis</exclude>
+                </excludes>
+              </artifactSet>              
+			  <relocations>
+                <relocation>
+                  <pattern>org.codehaus.plexus.util</pattern>
+                  <excludes>
+                    <exclude>org.codehaus.plexus.util.xml.Xpp3Dom</exclude>
+                    <exclude>org.codehaus.plexus.util.xml.pull.*</exclude>
+                  </excludes>
+                </relocation>
+              </relocations>              
+              <transformers>
+                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
+              </transformers>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  ...
+</project>
++-----
+
+ * Shade Plugin with renamed and attached artifact
+
++-----
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <shadedArtifactId>shaded-artifact</shadedArtifactId>
+              <shadedArtifactAttached>true</shadedArtifactAttached>
+              <shadedClassifierName>jackofall</shadedClassifierName> <!-- Any name that makes sense -->
+              <artifactSet>
+                <excludes>
+                  <exclude>classworlds:classworlds</exclude>
+                  <exclude>junit:junit</exclude>
+                  <exclude>jmock:jmock</exclude>
+                  <exclude>xml-apis:xml-apis</exclude>
+                </excludes>
+              </artifactSet>                            
+			  <relocations>
+                <relocation>
+                  <pattern>org.codehaus.plexus.util</pattern>
+                  <excludes>
+                    <exclude>org.codehaus.plexus.util.xml.Xpp3Dom</exclude>
+                    <exclude>org.codehaus.plexus.util.xml.pull.*</exclude>
+                  </excludes>
+                </relocation>
+              </relocations>              
+              <transformers>
+                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
+              </transformers>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  ...
+</project>
++-----
\ No newline at end of file

Added: maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/index.apt?rev=581854&view=auto
==============================================================================
--- maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/index.apt (added)
+++ maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/index.apt Thu Oct  4 04:22:55 2007
@@ -0,0 +1,45 @@
+ ------
+ Maven 2 Shade Plugin
+ ------
+ Mauro Talevi
+ ------
+ ~~ Copyright 2007 The Apache Software Foundation.
+~~
+~~ Licensed under the Apache License, Version 2.0 (the "License");
+~~ you may not use this file except in compliance with the License.
+~~ You may obtain a copy of the License at
+~~
+~~      http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+ 
+Introduction
+
+ This plugin provides the capability to package the artifact in a uber-jar, including its dependencies and 
+ to "shade" - ie rename - the packages of some of the dependencies.
+ 
+ * Goals Overview
+
+  The Shade Plugin has a single goal:
+  
+  * {{{shade-mojo.html}shade:shade}} is bound to the package phase and
+  is used to create a shaded jar.
+
+
+ * Usage
+
+  Instructions on how to use the Shade Plugin can be found in the
+  {{{usage.html}usage}} page.
+
+ * Examples
+
+  To provide you with better understanding on some usages of the Shade
+  Plugin, you can take a look {{{examples.html}examples}} page.
+

Added: maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/usage.apt?rev=581854&view=auto
==============================================================================
--- maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/usage.apt (added)
+++ maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/apt/usage.apt Thu Oct  4 04:22:55 2007
@@ -0,0 +1,50 @@
+ ------
+ Maven 2 Shade Plugin
+ ------
+ Mauro Talevi
+ ------
+~~ Copyright 2007 The Apache Software Foundation.
+~~
+~~ Licensed under the Apache License, Version 2.0 (the "License");
+~~ you may not use this file except in compliance with the License.
+~~ You may obtain a copy of the License at
+~~
+~~      http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+ * Creating a shaded jar
+
+  The goals for the Shade Plugin are bound to the package phase in the
+  build lifecycle.  
+
++-----
+mvn package
++-----
+
+ * Configuring Your Shade Plugin
+
++-----
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <configuration>
+          <!-- put your configurations here -->
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  ...
+</project>
++-----
\ No newline at end of file

Added: maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/site.xml?rev=581854&view=auto
==============================================================================
--- maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/site.xml (added)
+++ maven/sandbox/trunk/plugins/maven-shade-plugin/src/site/site.xml Thu Oct  4 04:22:55 2007
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<project name="Maven Shade Plugin">  
+  <body>
+    <menu name="Overview">
+      <item name="Introduction" href="index.html"/>
+      <item name="Usage" href="usage.html"/>
+      <item name="Examples" href="examples.html"/>
+    </menu>
+  </body>
+</project>