You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/03/25 06:05:12 UTC

[GitHub] [maven-shade-plugin] rmannibucau commented on a change in pull request #39: [MSHADE-353] adding a generic relocation friendly transformer

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:
users@infra.apache.org


With regards,
Apache Git Services