1
$ mvn --version 

Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)

Maven home: /home/redacted/.sdkman/candidates/maven/current

Java version: 17.0.1, vendor: Azul Systems, Inc., runtime: /home/redacted/.sdkman/candidates/java/17.0.1.fx-zulu

Default locale: en_US, platform encoding: UTF-8

OS name: "linux", version: "5.4.0-91-generic", arch: "amd64", family: "unix"

Running the following command never finishes and it appears to be hung.

mvn -X dependency:tree -Dverbose

The last lines of the debug log report:

[DEBUG] Using transporter WagonTransporter with priority -1.0 for http://repository.tesla.io:8081/nexus/content/repositories/snapshots/

[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://repository.tesla.io:8081/nexus/content/repositories/snapshots/

I'm curious why running a dependency tree command is causing maven to try to hit the tesla.io repository on port 8081.

Is there some way to tell dependency:tree to skip this repository (or to configure some timeout and skip all repositories that are unreachable within some specified timeout limit)?

How can I trace the reason why dependency:tree is trying to read from the tesla repository?

axiopisty
  • 4,972
  • 8
  • 44
  • 73
  • Following as I've seen this exact same behavior after upgrading spring-boot-starter from 2.5.5 to 2.6.1. – SteveGreenslade Jan 06 '22 at 08:42
  • I suppose you have either a settings.xml with appropriate configuration... – khmarbaise Jan 06 '22 at 08:55
  • 1
    For my case, with spring-boot... removing the -Dverbose flag, allows the dependency tree to complete.... but I need to use the flag for another reason. – SteveGreenslade Jan 06 '22 at 08:58
  • @khmarbaise - No. I don't have a ~/.m2/settings.xml. Everything is default configuration. I did install maven using SdkMan though. Maybe I'll tag that project too. – axiopisty Jan 06 '22 at 23:46
  • If don't have a settings.xml where have you configured to consume tesla.io from ? wihtin your pom file? Because it looks like an internal repository manager which should be configured in your settings.xml .... – khmarbaise Jan 06 '22 at 23:49
  • Exactly. That's what I'm wanting to figure out. There's nothing in my pom.xml with that configuration. And, these appear to be for snapshots. I did confirm as mentioned by @SteveGreenslade that removing the verbose flag does allow the goal to execute successfully. Notice this answer links to documentation stating that using the verbose flag on 3.5+ could cause errors: https://stackoverflow.com/a/46417483/328275 – axiopisty Jan 07 '22 at 03:22

1 Answers1

0

As mentioned in the comment above by SteveGreenslade, and per the maven-dependency-plugin documentation:

verbose:

Deprecated. in 2.5

Whether to include omitted nodes in the serialized dependency tree.

  • Type: boolean
  • Since: 2.0-alpha-6
  • Required: No User Property: verbose
  • Default: false

Removing the -D verbose flag after upgrading the plugin above version 2.5 fixed the problem for me.

axiopisty
  • 4,972
  • 8
  • 44
  • 73