Replace Plexus Components by plain JSR 330 Components
Plexus Components are deprecated (https://codehaus-plexus.github.io/plexus-containers/) and should be replaced by plain JSR 330 components (https://github.com/eclipse/sisu.plexus/wiki/Plexus-to-JSR330).
Here are some examples of JSR 330 components:
- lifecycle mapping: https://github.com/apache/maven-rar-plugin/blob/master/src/main/java/org/apache/maven/plugins/rar/internal/RarLifecycleMappingProvider.java
- artifact handler: https://github.com/apache/maven-rar-plugin/blob/master/src/main/java/org/apache/maven/plugins/rar/internal/RarArtifactHandler.java
(there is no component descriptor for JSR 330 as in https://codehaus-plexus.github.io/plexus-containers/plexus-container-default/plexus-components.html, therefore all component.xml files need to be replaced by Java code)
@kwin Currently Maven 3.8.x contain JSR 330 implementation that is not compatible with Java 17 so we have to wait for Maven 3.9.x release here.
@kwin Currently Maven 3.8.x contain JSR 330 implementation that is not compatible with Java 17 so we have to wait for Maven 3.9.x release here.
Are you referring to Eclipse Sisu-Inject 0.3.5 as implementation? It looks like support for later Java-versions was already added, but it has not yet been released. So unless this happens before Maven 3.9.x, which then has to be included, we have to wait longer.
@HannesWell https://issues.apache.org/jira/browse/MNG-7502 is required for Java 17 support. Not sure if https://github.com/eclipse/sisu.inject/commit/4790d3e28987ee4c2472d576e544c07028a85f42 is required as well (the latter would require a new sisu.inject release….
@HannesWell https://issues.apache.org/jira/browse/MNG-7502 is required for Java 17 support. Not sure if eclipse/sisu.inject@4790d3e is required as well (the latter would require a new sisu.inject release….
Thanks for the pointer to the maven issue. I can only tell that I'm about to add a Maven-extension that adds an EventSpy for m2e that is compiled with java-17. Using Sisu.inject 0.3.5 that did not work, but using Plexus-components worked for me.
@HannesWell You need Guice 5.1 (part of upcoming Maven 3.9) as well.