Author: olamy
Date: Tue Mar 13 16:12:43 2012
New Revision: 1300216

URL: http://svn.apache.org/viewvc?rev=1300216&view=rev
Log:
[SHADE-91] Allow using external Shader implementation
add documentation page.

Added:
    
maven/plugins/trunk/maven-shade-plugin/src/site/apt/examples/use-shader-other-impl.apt.vm
   (with props)
Modified:
    maven/plugins/trunk/maven-shade-plugin/src/site/site.xml

Added: 
maven/plugins/trunk/maven-shade-plugin/src/site/apt/examples/use-shader-other-impl.apt.vm
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/site/apt/examples/use-shader-other-impl.apt.vm?rev=1300216&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-shade-plugin/src/site/apt/examples/use-shader-other-impl.apt.vm
 (added)
+++ 
maven/plugins/trunk/maven-shade-plugin/src/site/apt/examples/use-shader-other-impl.apt.vm
 Tue Mar 13 16:12:43 2012
@@ -0,0 +1,95 @@
+ ------
+ Using an other Shader Implementation
+ ------
+ Olivier Lamy
+ ------
+ 2012-03-13
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you 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.
+
+Using your own Shader implementation
+
+  By default, the plugin provide a DefaultShader implementation but with 
version 1.6 you can use your own implementation.
+
+  Create a standard Maven project with your implementation.
+
++-----
+/**
+ *
+ * @plexus.component instantiation-strategy="per-lookup" role-hint="mock"
+ */
+public class MockShader
+    implements Shader
+{
+  // implement the interface here
+}
+
+// Use the plexus maven plugin in your job to generate Plexus metadata
+
+      <plugin>
+        <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-maven-plugin</artifactId>
+        <version>1.3.8</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>descriptor</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
++-----
+
+  Assuming your project has coordinate org.foo.bar:wine:1.0, you must add it 
as a dependency of the shade plugin.
+
++-----
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>${project.version}</version>
+        <dependencies>
+          <dependency>
+            <groupId>org.foo.bar</groupId>
+            <artifactId>wine</artifactId>
+            <version>1.0</version>
+          </dependency>
+        </dependencies>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <shaderHint>mock</shaderHint>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  ...
+</project>
++-----
+
+  Now the mojo will use your own implementation.

Propchange: 
maven/plugins/trunk/maven-shade-plugin/src/site/apt/examples/use-shader-other-impl.apt.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-shade-plugin/src/site/apt/examples/use-shader-other-impl.apt.vm
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/plugins/trunk/maven-shade-plugin/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-shade-plugin/src/site/site.xml?rev=1300216&r1=1300215&r2=1300216&view=diff
==============================================================================
--- maven/plugins/trunk/maven-shade-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-shade-plugin/src/site/site.xml Tue Mar 13 
16:12:43 2012
@@ -36,6 +36,7 @@ under the License.
       <item name="Attaching the Shaded Artifact" 
href="examples/attached-artifact.html"/>
       <item name="Executable JAR" href="examples/executable-jar.html"/>
       <item name="Resource Transformers" 
href="examples/resource-transformers.html"/>
+      <item name="Using an other Shader implementation" 
href="examples/use-shader-other-impl.html"/>
     </menu>
   </body>
 </project>


Reply via email to