Thanks for the explanation. As the AbstractLifecycleMappingProvider is Maven 4 only the solution for extensions/plugins supporting Maven 3 is staying with plexus metadata?
Also I see that this is still the current way of how this is implemented in maven-jar-plugin (https://github.com/apache/maven-jar-plugin/blob/master/src/main/filtered-resources/META-INF/plexus/components.xml). Konrad On 2022/07/04 07:23:42 Hervé BOUTEMY wrote: > on getting rid of plexus metadata for lifecycle mappings, see the work done > in core [1]: they are replaced by Provider classes > > I suppose that doing equivalent classes with JSR-330 annotations in an > extension will override the core-provided classes given classpath order > > Regards, > > Hervé > > [1] > https://github.com/apache/maven/tree/master/maven-core/src/main/java/org/apache/maven/lifecycle/providers > > Le lundi 4 juillet 2022, 08:48:01 CEST Konrad Windszus a écrit : > > Hi, > > What is the best way to get rid of plexus metadata (components.xml) and > > override the default lifecycle mapping for a certain type (as outlined in > > https://blog.sonatype.com/2009/08/create-a-customized-build-process-in-mave > > n/) only leveraging JSR 330 annotations > > (https://github.com/eclipse/sisu.plexus/wiki/Plexus-to-JSR330)? > > > > I guess I have to convert the XML configuration to a simple Java class with > > annotations. Is there no configuration via metadata files available in > > Sisu? > > > > Also prior 2020 > > (https://github.com/apache/maven/commit/6c7d105916bb288b1f0f7010035c718f16e > > 11240, only part of Maven 4) there was only the default constructor and the > > private field lifecycles > > (https://github.com/apache/maven/blob/673a7d1fef55795ea47a147f158a1411475e7 > > 495/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/DefaultLifec > > ycleMapping.java#L33) so I would have to work with reflection to inject the > > correct configuration. > > > > Any hints highly appreciated. > > Konrad > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
