[ 
https://issues.apache.org/jira/browse/MNG-8671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17940807#comment-17940807
 ] 

Guillaume Nodet commented on MNG-8671:
--------------------------------------

Maybe a better idea would be to scope requests:
{code}
try (var context = session.newContext(new RequestTrace("my-context"))) {
   ... send requests...
}
{code}
or
{code}
Session localSession = session.withContext(new RequestTrace("my-context"));
...
{code}
Else, we need to convey an extra parameter everywhere.

The second may more in line with the existing api which already defines 
{{withLocalRepository}} and {{withRemoteRepositories}} methods.

> Resolver context usage should be enforced
> -----------------------------------------
>
>                 Key: MNG-8671
>                 URL: https://issues.apache.org/jira/browse/MNG-8671
>             Project: Maven
>          Issue Type: Improvement
>          Components: Artifacts and Repositories
>            Reporter: Tamas Cservenak
>            Priority: Major
>             Fix For: 4.0.0-rc-4
>
>
> This one is tricky, as it tackles Maven Core but also Maven Plugins, 
> basically {_}everything that is using Resolver API{_}.
> All the Resolver request objects (most) carries "context" string, that is 
> unused in Resolver itself, but carries possible extra information to those 
> listening in, like "in which context is this resolver request executing".
> Maven4 also offers similar API, maybe we want to target this issue for Maven 
> 4 only, as again, properly fixing this in Maven 3 is nearly impossible, would 
> tackle all code touching resolver APIs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to