plugin dependency not found in offline mode, despite dependency:resovle-plugins completed

2020-11-28 Thread Anton Vodonosov
Hello

$ mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:resolve-plugins
...
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.29/checkstyle-8.29.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.29/checkstyle-8.29.pom
 (124 KB at 137.2 KB/sec)
...
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.29/checkstyle-8.29.jar
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.29/checkstyle-8.29.jar
 (1317 KB at 2938.7 KB/sec)
...
[INFO] The following plugins have been resolved:
[INFO]
org.apache.maven.plugins:maven-checkstyle-plugin:maven-plugin:3.1.1:runtime
[INFO]   ...
[INFO]   com.puppycrawl.tools:checkstyle:jar:8.29
[INFO]   ...


$ mvn -o verify
...
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1:check (default) on 
project redisson: Execution default of goal 
org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1:check failed: Plugin 
org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1 or one of its 
dependencies could not be resolved: Failed to collect dependencies at 
org.apache.maven.plugins:maven-checkstyle-plugin:jar:3.1.1 -> 
com.puppycrawl.tools:checkstyle:jar:[8.18,): No versions available for 
com.puppycrawl.tools:checkstyle:jar:[8.18,) within specified range -> [Help 1]


Note, usual dependencies were resolved otherwise (when building dependency 
tree),
that's why compilation succeeded in the offline mode.

Full reproduction steps:

git clone https://github.com/redisson/redisson.git
cd redisson
 # to be sure we speak of the same version:
git checkout 2a507699c3208e6856b6fb0f67a8b921718f7945
# in case you accidentially already have some version of checkstyle.jar
# that will make the case behave differently:
rm -r ~/.m2/repository/com/puppycrawl/tools/checkstyle/
mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:tree
mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:resolve-plugins
mvn -o verify

So it seems the dependency:resolve-plugins uses different algorithm for 
dependency
resolution than is used during real build.

BTW, the same can be said about the dependency:resolve / dependency:go-offline
mojos. I have two project that I can build successsfully, successfully generate
dependency tree. But dependency:resolve / dependency:go-offline fail
for them (one of those projects is the above used redisson, try
dependency:resolve on it).

Interestingly, if I remove the -o flag, the build log has this:

Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/maven-metadata.xml
Downloading: 
https://repository.apache.org/snapshots/com/puppycrawl/tools/checkstyle/maven-metadata.xml
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/maven-metadata.xml
 (4 KB at 3.3 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.18/checkstyle-8.18.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.18/checkstyle-8.18.pom
 (123 KB at 718.7 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.19/checkstyle-8.19.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.19/checkstyle-8.19.pom
 (124 KB at 1099.3 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.20/checkstyle-8.20.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.20/checkstyle-8.20.pom
 (123 KB at 1208.4 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.21/checkstyle-8.21.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.21/checkstyle-8.21.pom
 (123 KB at 1274.6 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.22/checkstyle-8.22.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.22/checkstyle-8.22.pom
 (123 KB at 1425.0 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.23/checkstyle-8.23.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.23/checkstyle-8.23.pom
 (123 KB at 827.9 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.24/checkstyle-8.24.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.24/checkstyle-8.24.pom
 (123 KB at 1332.4 KB/sec)
Downloading: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.25/checkstyle-8.25.pom
Downloaded: 
https://repo.maven.apache.org/maven2/com/puppycrawl/tools/checkstyle/8.25/checkstyle-8.25.pom
 (122 KB at 1385.3 KB/sec)
Downloading: 

Re: Maven goes to repository for a dependency from reactor

2020-11-28 Thread Anton Vodonosov
BTW, dependency:resovle still works the old way, even in the latest version:

   $ cd redisson
   $ mvn -X org.apache.maven.plugins:maven-dependency-plugin:3.1.2:resolve


[ERROR] Failed to execute goal on project redisson-all: Could not resolve 
dependencies for project org.redisson:redisson-all:jar:3.14.1-SNAPSHOT: Could 
not find artifact org.redisson:redisson:jar:3.14.1-SNAPSHOT in snapshots-repo 
(https://oss.sonatype.org/content/repositories/snapshots) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
on project redisson-all: Could not resolve dependencies for project 
org.redisson:redisson-all:jar:3.14.1-SNAPSHOT: Could not find artifact 
org.redisson:redisson:jar:3.14.1-SNAPSHOT in snapshots-repo 
(https://oss.sonatype.org/content/repositories/snapshots)
at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:221)
at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not 
resolve dependencies for project org.redisson:redisson-all:jar:3.14.1-SNAPSHOT: 
Could not find artifact org.redisson:redisson:jar:3.14.1-SNAPSHOT in 
snapshots-repo (https://oss.sonatype.org/content/repositories/snapshots)
at 
org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:211)
at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
... 23 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could 
not find artifact org.redisson:redisson:jar:3.14.1-SNAPSHOT in snapshots-repo 
(https://oss.sonatype.org/content/repositories/snapshots)
at 
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at 
org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:205)
... 24 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not 
find artifact org.redisson:redisson:jar:3.14.1-SNAPSHOT in snapshots-repo 
(https://oss.sonatype.org/content/repositories/snapshots)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at 
org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
... 25 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not 
find artifact org.redisson:redisson:jar:3.14.1-SNAPSHOT in snapshots-repo 
(https://oss.sonatype.org/content/repositories/snapshots)
at 
org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
at 
org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at 
org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at 

Re: [*EXT*] Re: Wagon : allow send Authorization header on redirect

2020-11-28 Thread Ionel GARDAIS
I agree with you : redirect hell is hard to cope with when the target tool does 
not provide a way to authenticate use with a side-auth. (Usually it takes the 
form of a token send as auth. Unfortunately this is only available with Nexus 
Pro along SAML auth, not the OSS one)


SSO is handled by Keycloak.
The client is configured with a ‘HTTP Basic auth flow’, that makes Keycloak use 
basic auth instead of a form for authentication.
oauth2-proxy redirects the request to SSO if the right cookie is not already 
set.

Flow would be :
- Maven connect to repository, sending the Authorization header
- auth cookie is not set so oauth proxy redirect the client to the SSO 
- as with curl’s —location-trusted, Authorization header would be sent to the 
SSO
- the SSO accepts the auth, set the cookie and redirect the client back to the 
repository
- the request is catched again by oauth proxy, but due to the cookie presence, 
it can confirm SSO auth and set the user header so Nexus Remote User Token auth 
is happy and artifact downloaded.

Io


> Le 28 nov. 2020 à 22:11, Michael Osipov  a écrit :
> 
> Am 2020-11-28 um 22:01 schrieb Ionel GARDAIS:
>> Hi list,
>> Is there a way to allow maven to send Authorization header on redirect like 
>> curl's --location-trusted ?
>>> From what I understand, 
>> [ 
>> https://github.com/apache/maven-wagon/blob/c956aac9007303ce9e1746c834d58dff097ce3d6/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java#L613
>>  | 
>> https://github.com/apache/maven-wagon/blob/c956aac9007303ce9e1746c834d58dff097ce3d6/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java#L613
>>  ]
>> restricts authentication to the target host.
>> However, if an SSO redirect occurs when connecting to the maven repository, 
>> auth is lost as the host is likely to have a different hostname.
>> Is ' maven.wagon.http.ssl.location-trusted ' something that could be 
>> implemented to bypass AuthScope ?
>> Or alternatively, how to authenticate maven with a multi-round auth ?
>> (My use case is a Nexus OSS repo with RUT enabled, behind oauth2-proxy)
> 
> Read my extensive analysis on that topic here: 
> https://issues.apache.org/jira/browse/WAGON-590
> 
> I never liked that stupid redirect hell many systems perform these days, 
> including OIDC with Authorization Code Flow.
> 
> A question aside, how do you plan to pass the flow with stock Wagon w/o 
> having a browser, are you using ROPC Grant?
> 
> Michael
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 

--
232 avenue Napoleon BONAPARTE 92500 RUEIL MALMAISON
Capital EUR 219 300,00 - RCS Nanterre B 408 832 301 - TVA FR 09 408 832 30
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


Re: Wagon : allow send Authorization header on redirect

2020-11-28 Thread Michael Osipov

Am 2020-11-28 um 22:01 schrieb Ionel GARDAIS:

Hi list,

Is there a way to allow maven to send Authorization header on redirect like 
curl's --location-trusted ?

From what I understand, 

[ 
https://github.com/apache/maven-wagon/blob/c956aac9007303ce9e1746c834d58dff097ce3d6/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java#L613
 | 
https://github.com/apache/maven-wagon/blob/c956aac9007303ce9e1746c834d58dff097ce3d6/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java#L613
 ]
restricts authentication to the target host.

However, if an SSO redirect occurs when connecting to the maven repository, 
auth is lost as the host is likely to have a different hostname.

Is ' maven.wagon.http.ssl.location-trusted ' something that could be 
implemented to bypass AuthScope ?
Or alternatively, how to authenticate maven with a multi-round auth ?
(My use case is a Nexus OSS repo with RUT enabled, behind oauth2-proxy)


Read my extensive analysis on that topic here: 
https://issues.apache.org/jira/browse/WAGON-590


I never liked that stupid redirect hell many systems perform these days, 
including OIDC with Authorization Code Flow.


A question aside, how do you plan to pass the flow with stock Wagon w/o 
having a browser, are you using ROPC Grant?


Michael

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



Wagon : allow send Authorization header on redirect

2020-11-28 Thread Ionel GARDAIS
Hi list, 

Is there a way to allow maven to send Authorization header on redirect like 
curl's --location-trusted ? 

>From what I understand, 
[ 
https://github.com/apache/maven-wagon/blob/c956aac9007303ce9e1746c834d58dff097ce3d6/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java#L613
 | 
https://github.com/apache/maven-wagon/blob/c956aac9007303ce9e1746c834d58dff097ce3d6/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java#L613
 ] 
restricts authentication to the target host. 

However, if an SSO redirect occurs when connecting to the maven repository, 
auth is lost as the host is likely to have a different hostname. 

Is ' maven.wagon.http.ssl.location-trusted ' something that could be 
implemented to bypass AuthScope ? 
Or alternatively, how to authenticate maven with a multi-round auth ? 
(My use case is a Nexus OSS repo with RUT enabled, behind oauth2-proxy) 

Thanks, 
Ionel 

--
232 avenue Napoleon BONAPARTE 92500 RUEIL MALMAISON
Capital EUR 219 300,00 - RCS Nanterre B 408 832 301 - TVA FR 09 408 832 301

Re: Maven goes to repository for a dependency from reactor

2020-11-28 Thread Anton Vodonosov


MDEP-409 was fixed by passing reactor projects as the 3rd parameter
to dependencyGraphBuilder.buildDependencyGraph:
https://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/tree/TreeMojo.java?r1=1791410=1791409=1791410

My plugin already have this. Right now old dependency:tree fails
but my plugin works.

But I don't think memory fails me, my plugin was failing.
Maybe it was caused by some state of the ~/.m2 directory.

Well, thank you. If I reproduce this again I will follow up.

Best regards,
- Anton

28.11.2020, 18:30, "Nick Stolwijk" :
> Hi Anton,
>
> I have taken a look at the issues fixed in 3.0.1 and I think you'll find
> the information you need in MDEP-409[1].
>
> [1] https://issues.apache.org/jira/browse/MDEP-409
>
> With regards,
>
> Nick Stolwijk
>
> ~~~ Try to leave this world a little better than you found it and, when
> your turn comes to die, you can die happy in feeling that at any rate you
> have not wasted your time but have done your best ~~~
>
> Lord Baden-Powell
>
> On Sat, Nov 28, 2020 at 6:46 AM Anton Vodonosov 
> wrote:
>
>>  Falko, thank you for the response. It works indeed.
>>
>>  However, the case with maven-dependency-plugin is a simplification of my
>>  case.
>>
>>  I actually faced this error first in the plugin I develop (since it was
>>  reproducible also
>>  with the more well known dependency plugin I mentioned only it in email).
>>
>>  My plugin builds dependency tree using the DependencyGraphBuilder injected
>>  into the plugin when it's loaded by maven:
>>
>>  
>> https://github.com/avodonosov/hashver-maven-plugin/blob/master/src/main/java/pro/avodonosov/mvnhashver/HashVerMojo.java#L99
>>
>>  Can you tell what is secret in the dependency plugin 3.0.1+ that makes it
>>  work?
>>  What should I fix in my plugin, in other words.
>>
>>  Best regards,
>>  - Anton
>>
>>  27.11.2020, 00:15, "Falko Modler" :
>>  > Try: mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:tree
>>  >
>>  > I'll actually work with 3.0.1+ but not with 2.8 which is the default for
>>  > that repo.
>>  >
>>  > Am 25.11.2020 um 22:18 schrieb Anton Vodonosov:
>>  >> When I run `mvn -X dependency:tree` in the root directory
>>  >> of redisson (https://github.com/redisson/redisson), I get the below
>>  error.
>>  >>
>>  >> Question: why does maven tries to resolve the `redisson` dependency
>>  >> of the `redisson-all` module using a remote repository, when `redisson`
>>  >> is a part of the reactor?
>>  >>
>>  
>> https://github.com/redisson/redisson/blob/683b0dfce2c97c576722176019f14404d1bf7223/pom.xml#L55
>>  >>
>>  
>> https://github.com/redisson/redisson/blob/683b0dfce2c97c576722176019f14404d1bf7223/redisson-all/pom.xml#L77
>>  >>
>>  >> [ERROR] Failed to execute goal on project redisson-all: Could not
>>  resolve dependencies for project
>>  org.redisson:redisson-all:jar:3.14.1-SNAPSHOT: Failure to find
>>  org.redisson:redisson:jar:3.14.1-SNAPSHOT in
>>  https://oss.sonatype.org/content/repositories/snapshots was cached in the
>>  local repository, resolution will not be reattempted until the update
>>  interval of snapshots-repo has elapsed or updates are forced -> [Help 1]
>>  >> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
>>  execute goal on project redisson-all: Could not resolve dependencies for
>>  project org.redisson:redisson-all:jar:3.14.1-SNAPSHOT: Failure to find
>>  org.redisson:redisson:jar:3.14.1-SNAPSHOT in
>>  https://oss.sonatype.org/content/repositories/snapshots was cached in the
>>  local repository, resolution will not be reattempted until the update
>>  interval of snapshots-repo has elapsed or updates are forced
>>  >> at
>>  
>> org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:221)
>>  >> at
>>  
>> org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
>>  >> at
>>  
>> org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245)
>>  >> at
>>  
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
>>  >> at
>>  
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>>  >> at
>>  
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>>  >> at
>>  
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
>>  >> at
>>  
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
>>  >> at
>>  
>> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>>  >> at
>>  
>> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>>  >> at
>>  org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
>>  >> at
>>  

Re: Maven goes to repository for a dependency from reactor

2020-11-28 Thread Nick Stolwijk
Hi Anton,

I have taken a look at the issues fixed in 3.0.1 and I think you'll find
the information you need in MDEP-409[1].

[1] https://issues.apache.org/jira/browse/MDEP-409

With regards,

Nick Stolwijk

~~~ Try to leave this world a little better than you found it and, when
your turn comes to die, you can die happy in feeling that at any rate you
have not wasted your time but have done your best ~~~

Lord Baden-Powell


On Sat, Nov 28, 2020 at 6:46 AM Anton Vodonosov 
wrote:

> Falko, thank you for the response. It works indeed.
>
> However, the case with maven-dependency-plugin is a simplification of my
> case.
>
> I actually faced this error first in the plugin I develop (since it was
> reproducible also
> with the more well known dependency plugin I mentioned only it in email).
>
> My plugin builds dependency tree using the DependencyGraphBuilder injected
> into the plugin when it's loaded by maven:
>
>
> https://github.com/avodonosov/hashver-maven-plugin/blob/master/src/main/java/pro/avodonosov/mvnhashver/HashVerMojo.java#L99
>
> Can you tell what is secret in the dependency plugin 3.0.1+ that makes it
> work?
> What should I fix in my plugin, in other words.
>
> Best regards,
> - Anton
>
> 27.11.2020, 00:15, "Falko Modler" :
> > Try: mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:tree
> >
> > I'll actually work with 3.0.1+ but not with 2.8 which is the default for
> > that repo.
> >
> > Am 25.11.2020 um 22:18 schrieb Anton Vodonosov:
> >>  When I run `mvn -X dependency:tree` in the root directory
> >>  of redisson (https://github.com/redisson/redisson), I get the below
> error.
> >>
> >>  Question: why does maven tries to resolve the `redisson` dependency
> >>  of the `redisson-all` module using a remote repository, when `redisson`
> >>  is a part of the reactor?
> >>
> https://github.com/redisson/redisson/blob/683b0dfce2c97c576722176019f14404d1bf7223/pom.xml#L55
> >>
> https://github.com/redisson/redisson/blob/683b0dfce2c97c576722176019f14404d1bf7223/redisson-all/pom.xml#L77
> >>
> >>  [ERROR] Failed to execute goal on project redisson-all: Could not
> resolve dependencies for project
> org.redisson:redisson-all:jar:3.14.1-SNAPSHOT: Failure to find
> org.redisson:redisson:jar:3.14.1-SNAPSHOT in
> https://oss.sonatype.org/content/repositories/snapshots was cached in the
> local repository, resolution will not be reattempted until the update
> interval of snapshots-repo has elapsed or updates are forced -> [Help 1]
> >>  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
> execute goal on project redisson-all: Could not resolve dependencies for
> project org.redisson:redisson-all:jar:3.14.1-SNAPSHOT: Failure to find
> org.redisson:redisson:jar:3.14.1-SNAPSHOT in
> https://oss.sonatype.org/content/repositories/snapshots was cached in the
> local repository, resolution will not be reattempted until the update
> interval of snapshots-repo has elapsed or updates are forced
> >>  at
> org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:221)
> >>  at
> org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
> >>  at
> org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245)
> >>  at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
> >>  at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> >>  at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> >>  at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> >>  at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> >>  at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> >>  at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> >>  at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
> >>  at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
> >>  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
> >>  at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
> >>  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
> >>  at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
> >>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> >>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >>  at java.lang.reflect.Method.invoke(Method.java:498)
> >>  at
>