Howdy,

see here and below:
https://github.com/apache/maven-resolver/blob/d13019ce5fa38c0951ca0fb0c62a3f5f1254cffc/maven-resolver-api/src/main/java/org/eclipse/aether/RepositorySystemSession.java#L439


T

On Fri, Jul 12, 2024 at 11:29 AM Nick Hensel
<nickhense...@icloud.com.invalid> wrote:

> Hi,
> I'm currently migrating my Maven Artifact Resolver 1.x code to 2.0.
> As of version 2.0 the recommend way to create a RepositorySystemSession is
> through a SessionBuilder.
> In my case, I need to set an own LocalRepositoryManager, which wraps two
> EnhancedLocalRepositoryManager instanced. The problem here is, that in
> order to create an instance of it I have to call
> RepositorySystem#newLocalRepositoryManager which needs a
> RepositorySystemSession, which I obviously cannot pass before creating it.
>
> To demonstrate this problem, here's a piece of code.
> ```java
> RepositorySystemSession session =
> repositorySystem.createSessionBuilder()
> .setLocalRepositoryManager(repositorySystem.newLocalRepositoryManager(SESSION,
> new LocalRepository(...)) // where should I get SESSION from?
> ```
>
> Best regards,
>

Reply via email to