For the record:
After talking to Michael it seems that 3. is currently the recommended way. For 
Maven 4 a new API is in the works, with a dedicated service for artifact 
resolving: 
https://github.com/apache/maven/blob/05c6ba360dda72d65ddeb35ad68d7365c1f8401e/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolver.java.

Konrad

On 2022/08/15 07:10:58 Konrad Windszus wrote:
> Hi,
> I found the following APIs dealing with resolving of Maven artifacts:
> 
> 1. 
> https://maven.apache.org/ref/3.8.6/apidocs/org/apache/maven/repository/RepositorySystem.html
> 2. 
> https://maven.apache.org/ref/3.8.6/apidocs/org/apache/maven/bridge/MavenRepositorySystem.html
> 3. 
> https://maven.apache.org/resolver/apidocs/org/eclipse/aether/RepositorySystem.html
> 
> According to https://wiki.eclipse.org/Aether/Using_Aether_in_Maven_Plugins 
> the API from 3. should be used in Mojos.
> 
> There is also a TODO in 
> https://cwiki.apache.org/confluence/display/MAVEN/Maven+Core+Cleanup#MavenCoreCleanup-SortoutRepositorySystem/MavenRepositorySystem
>  related to 1. and 2. And it seems the only implementation of 1. is actually 
> in maven-compat (https://issues.apache.org/jira/browse/MNG-6561). The purpose 
> of 2. is not that clear to me, as it doesn’t even provide a method for 
> resolving, but only some helpers around it.
> 
> Thanks in advance for any pointers.
> 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]

Reply via email to