This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-shade-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new bd50e65  Show a custom Shader as a JSR-330 component
bd50e65 is described below

commit bd50e65cbd4510cbe44483f24cec8117ff8a1ee0
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sun Nov 1 16:10:23 2026 +0000

    Show a custom Shader as a JSR-330 component
---
 .../markdown/examples/use-shader-other-impl.md.vm  | 42 ++++++----------------
 1 file changed, 11 insertions(+), 31 deletions(-)

diff --git a/src/site/markdown/examples/use-shader-other-impl.md.vm 
b/src/site/markdown/examples/use-shader-other-impl.md.vm
index 9d4a0a2..526f242 100644
--- a/src/site/markdown/examples/use-shader-other-impl.md.vm
+++ b/src/site/markdown/examples/use-shader-other-impl.md.vm
@@ -28,43 +28,23 @@ under the License.
 
 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.
+Create a standard Maven project with your implementation. Make the shader a 
JSR-330 component, named by the hint that selects it:
 
-```text
+```java
+import javax.inject.Named;
+import javax.inject.Singleton;
 
-Dependency to Plexus annotations
+import org.apache.maven.plugins.shade.Shader;
 
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-component-annotations</artifactId>
-      <version>1.5.5</version>
-    </dependency>
-
-Create your Shader
-
-@Component( role = Shader.class, hint = "mock" )
-public class MockShader
-    implements Shader
-{
-  // implement the interface here
+@Singleton
+@Named("mock")
+public class MockShader implements Shader {
+    // implement the interface here
 }
-
-// Use the plexus component metadata plugin in your job to generate Plexus 
metadata
-
-      <plugin>
-        <groupId>org.codehaus.plexus</groupId>
-        <artifactId>plexus-component-metadata</artifactId>
-        <version>1.5.5</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>generate-metadata</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
 ```
 
+The project needs a `javax.inject` dependency and the component index that the 
`sisu-maven-plugin` writes; see [How to use 
JSR-330](https://maven.apache.org/maven-jsr330.html#How_to_use_JSR-330).
+
 Assuming your project has coordinate org.foo.bar:wine:1.0, you must add it as 
a dependency of the shade plugin.
 
 ```xml

Reply via email to