rmannibucau commented on a change in pull request #39: [MSHADE-353] adding a 
generic relocation friendly transformer
URL: https://github.com/apache/maven-shade-plugin/pull/39#discussion_r397625820
 
 

 ##########
 File path: src/site/apt/examples/resource-transformers.apt.vm
 ##########
 @@ -601,6 +603,45 @@ Transformers in 
<<<org.apache.maven.plugins.shade.resource>>>
 </project>
 +-----
 
+* Relocating file content with {RelocationTransformer}
+
+  The <<<RelocationTransformer>>> allows to apply relocators before delegating 
the processing to other transformers.
+
++-----
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <transformers>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.RelocationTransformer">
 
 Review comment:
   This example is about composing transformers which is not something obvious 
for most people.
   Defining each one after the other does not work because the relocation 
transformer is a delagate pattern which only works if there is another 
transformer saying it what it should handle. Goal is not to not define resource 
twice but to be able to decorate any transformer with this feature, including 
the ones with dynamic resource handling (pattern in canTransform for ex).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to