Re: APIs for reading Maven repositories

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: APIs for reading Maven repositories

Elliotte Rusty Harold
On Mon, May 4, 2020 at 10:25 AM Mickael Istria <[hidden email]> wrote:

> If you need a RepositorySystemSession, best seems to be creatin a
> MavenExecutionRequest, and then
> `container.lookup(DefaultRepositorySystemSessionFactory.class).newRepositorySession(mavenRequest)`.
> This is what's used both by Eclipse m2e and LemMinX-Maven, with some
> success.

DefaultRepositorySystemSessionFactory is itself an internal class, so
that doesn't really resolve the issue.

I've looked into the code of the projects cited in this thread, and so
far they all seem to be relying on internal classes including
MavenRepositorySystemUtils. They just hide it a couple of levels

Right now Aether really don't seem to have a published (i.e.
non-internal) API for loading a Maven repository. This suggests we
might want to externalize, document, and commit to supporting the
MavenRepositorySystemUtils class. Either that or provide some
alternate mechanism for bootstrapping aether.

Elliotte Rusty Harold
[hidden email]

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]