[ 
https://issues.apache.org/jira/browse/MNG-7471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tamás Cservenák updated MNG-7471:
---------------------------------
    Description: 
With Maven 3.9.0-SNAPSHOT (post MNG-7453 done) there is a binary breakage 
introduced for plugins using Resolver, as proven by new IT MNG-7470.

Problem is following:

Maven Core exports following packages:
 * resolver-api
 * resolver-spi
 * resolver-impl

This means, that a plugin will be forced to use these from core (1.8.0), but 
they will keep using their own resolver-connector-basic. Resolver 1.8.0 
introduces API changes that affects all of impl, connector-basic and spi, 
basically their own copy of connector-basic will fail.

So plugin will have added its "own" dependencies to plugin realm with:
 * resolver-util
 * resolver-connector-basic

But alas, the interface change from resolver-spi will prevent class from 
resolver-connector-basic to be instantiated.

Error that is thrown during execution of plugin using Resolver:
{{Caused by: org.apache.maven.plugin.PluginContainerException: An API 
incompatibility was encountered while executing 
io.quarkus:quarkus-maven-plugin:2.3.1.Final:build: java.lang.NoSuchMethodError: 
'java.util.List 
org.eclipse.aether.spi.connector.layout.RepositoryLayout.getChecksums(org.eclipse.aether.artifact.Artifact,
 boolean, java.net.URI)'}}

Important note: the error is triggered only when remote download happens, so 
even IT will pass OK with 3.9.0-SNAPSHOT IF local repository is pre-populated, 
hence, no remote download happens!

  was:
With Maven 3.9.0-SNAPSHOT (post MNG-7453 done) there is a binary breakage 
introduced for plugins using Resolver, as proven by new IT MNG-7470.

Problem is following:

Maven Core exports following packages:
 * resolver-api
 * resolver-spi
 * resolver-impl

This means, that a plugin will be forced to use these from core (1.8.0), but 
they will keep using their own resolver-connector-basic. Resolver 1.8.0 
introduces API changes that affects all of impl, connector-basic and spi, 
basically their own copy of connector-basic will fail.

Error that is thrown during execution of plugin using Resolver:
{{Caused by: org.apache.maven.plugin.PluginContainerException: An API 
incompatibility was encountered while executing 
io.quarkus:quarkus-maven-plugin:2.3.1.Final:build: java.lang.NoSuchMethodError: 
'java.util.List 
org.eclipse.aether.spi.connector.layout.RepositoryLayout.getChecksums(org.eclipse.aether.artifact.Artifact,
 boolean, java.net.URI)'}}

Important note: the error is triggered only when remote download happens, so 
even IT will pass OK with 3.9.0-SNAPSHOT IF local repository is pre-populated, 
hence, no remote download happens!


> Resolver 1.8.0 introduces binary breakage in plugin using Resolver
> ------------------------------------------------------------------
>
>                 Key: MNG-7471
>                 URL: https://issues.apache.org/jira/browse/MNG-7471
>             Project: Maven
>          Issue Type: Bug
>          Components: Class Loading
>    Affects Versions: 3.9.0-candidate
>            Reporter: Tamás Cservenák
>            Priority: Major
>
> With Maven 3.9.0-SNAPSHOT (post MNG-7453 done) there is a binary breakage 
> introduced for plugins using Resolver, as proven by new IT MNG-7470.
> Problem is following:
> Maven Core exports following packages:
>  * resolver-api
>  * resolver-spi
>  * resolver-impl
> This means, that a plugin will be forced to use these from core (1.8.0), but 
> they will keep using their own resolver-connector-basic. Resolver 1.8.0 
> introduces API changes that affects all of impl, connector-basic and spi, 
> basically their own copy of connector-basic will fail.
> So plugin will have added its "own" dependencies to plugin realm with:
>  * resolver-util
>  * resolver-connector-basic
> But alas, the interface change from resolver-spi will prevent class from 
> resolver-connector-basic to be instantiated.
> Error that is thrown during execution of plugin using Resolver:
> {{Caused by: org.apache.maven.plugin.PluginContainerException: An API 
> incompatibility was encountered while executing 
> io.quarkus:quarkus-maven-plugin:2.3.1.Final:build: 
> java.lang.NoSuchMethodError: 'java.util.List 
> org.eclipse.aether.spi.connector.layout.RepositoryLayout.getChecksums(org.eclipse.aether.artifact.Artifact,
>  boolean, java.net.URI)'}}
> Important note: the error is triggered only when remote download happens, so 
> even IT will pass OK with 3.9.0-SNAPSHOT IF local repository is 
> pre-populated, hence, no remote download happens!



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to