You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Shahim Essaid <sh...@essaid.com> on 2021/05/07 05:08:56 UTC

Using Maven/Aether resolver programmatically outside Maven environment

Hi all,

I'm getting familiar with using the Maven/Aether resolver API outside the
Maven build environment. I need help understanding what additional steps
are needed to process the dependency graph obtained from:

org.eclipse.aether.RepositorySystem.resolveDependencies(...)

to be able to have the same resolution of the dependency as it is done
during a maven build.

I'm working on some tooling that will be run inside a Maven project build
(by a plugin) and outside a maven build and I need the tooling to be able
to consume exactly the same dependency graph and artifacts.

I'm assuming I can get the same results by using the "maven-resolver" API
and won't need additional "maven-core" APIs. Is that correct? If not, what
else is needed?

Any hints will be much appreciated and thank you in advance.

Shahim

Re: Using Maven/Aether resolver programmatically outside Maven environment

Posted by Manfred Moser <ma...@simpligility.com>.
I wrote (and kind of still maintain) the maven repository tools .. it does that. Just have a look at the code.


https://github.com/simpligility/maven-repository-tools

Manfred

Shahim Essaid wrote on 2021-05-06 22:08 (GMT -07:00):

> Hi all,
> 
> I'm getting familiar with using the Maven/Aether resolver API outside the
> Maven build environment. I need help understanding what additional steps
> are needed to process the dependency graph obtained from:
> 
> org.eclipse.aether.RepositorySystem.resolveDependencies(...)
> 
> to be able to have the same resolution of the dependency as it is done
> during a maven build.
> 
> I'm working on some tooling that will be run inside a Maven project build
> (by a plugin) and outside a maven build and I need the tooling to be able
> to consume exactly the same dependency graph and artifacts.
> 
> I'm assuming I can get the same results by using the "maven-resolver" API
> and won't need additional "maven-core" APIs. Is that correct? If not, what
> else is needed?
> 
> Any hints will be much appreciated and thank you in advance.
> 
> Shahim
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org