[
https://issues.apache.org/jira/browse/MNG-7471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17731057#comment-17731057
]
ASF GitHub Bot commented on MNG-7471:
-------------------------------------
rbourbonnavarro commented on PR #732:
URL: https://github.com/apache/maven/pull/732#issuecomment-1584976645
Hi @cstamas, why was the package of `maven-resolver-connector-basic` not
exported as the one of `maven-resolver-util` was? I have a use case where I'm
setting up the
[`RepositorySystem`](https://github.com/apache/maven/blob/ac0bc5541e3d1a19b22c4138c354237c8202e11f/maven-core/src/main/java/org/apache/maven/repository/RepositorySystem.java#L42)
with the
[`DefaultServiceLocator`](https://github.com/apache/maven-resolver/blob/fa5d6cf96618cca3ea5b8dcba48b315f68586c78/maven-resolver-impl/src/main/java/org/eclipse/aether/impl/DefaultServiceLocator.java#L93)
and I can't add the
[`BasicRepositoryConnectorFactory`](https://github.com/apache/maven-resolver/blob/fa5d6cf96618cca3ea5b8dcba48b315f68586c78/maven-resolver-connector-basic/src/main/java/org/eclipse/aether/connector/basic/BasicRepositoryConnectorFactory.java#L48)
as the implementation for
[`RepositoryConnectorFactory`](https://github.com/apache/maven-resolver/blob/fa5d6cf96618cca3ea5b8dcba48b315f68586c78/maven-resolver-spi/src/main/java/org/eclipse/aether/spi/connector/RepositoryConnectorFactory.java#L32)
because I don't have access to it.
How is the right way to achieve this in `Maven 3.9`?
> 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.x-candidate
> Reporter: Tamas Cservenak
> Assignee: Tamas Cservenak
> Priority: Major
> Fix For: 3.9.0, 4.0.0-alpha-2, 4.0.0
>
>
> 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
> While plugin will have added its "own" versions of these below to plugin
> realm:
> * resolver-util
> * resolver-connector-basic
> This means, that a plugin will be forced to use api/spi/imp from core
> (1.8.0), but they will keep using their own util and 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. 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.10#820010)