Gradle dependencies - better output

I have a situation where a transitive dependency is ‘quarantined’ in our artifact repository. As such it can not and will not be downloaded.

This quarantined dependency is not an explicit dependency - rather it is a transitive dependency - I want to know which of my dependencies needs the failing file… Basically “What requires transitive dependency xxxx.yyyy”

gradle output with --info, nor --debug offers any useful information.

Have a look at the dependencies and dependenciesInsight tasks.
The former gives a top-down tree of the dependencies.
The latter lets you ask the question “why is this dependency in that configuration” bottom up, so probably what serves you better in this case.

This is the output from gradle (either dependencies or dependencyInsigh)…
There is no list of dependencies - this is the only output. Gradle terminates before generating any useful information. Because the dependent file can’t be downloaded - the process stops and does not produce any output. It should be able to output the dependency graph up the tree from the point of failure. It does not… Nothing is produced but the error message.

I thought --info or --debug would produce the ‘as known’ dependency graph, calling out the failing node in the graph… That way the ‘needed by’ dependency would at least be known.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ‘:project’.

Could not resolve all files for configuration ‘:project:classpath’.
Could not download commons-text-1.7.jar (org.apache.commons:commons-text:1.7)
Could not get resource ‘https://artifact-repository/repository/maven-all/org/apache/commons/commons-text/1.7/commons-text-1.7.jar’.
Could not GET ‘https://artifact-repository/repository/maven-all/org/apache/commons/commons-text/1.7/commons-text-1.7.jar’. Received status code 403 from server: -------------------->>> REQUESTED ITEM IS QUARANTINED -------------------->>> FOR DETAILS SEE ------>>> https://artifact-repository/ui/links/repositories/quarantinedComponent/ODhkZjEyNzFmMGYzNGUwYzk0NjY1Yjk4NDExZTVjNzk <<<------

I want to know what dependency needs commons-text. My build.gradle has no dependency on commons-text. Obviously something I do need has a transitive closure need for commons-text…

This is the output from gradle (either dependencies or dependencyInsigh)…
There is no list of dependencies - this is the only output.

Well, then there are oviously no dependencies in your root project. :wink:

Gradle terminates before generating any useful information. Because the dependent file can’t be downloaded - the process stops and does not produce any output. It should be able to output the dependency graph up the tree from the point of failure. It does not… Nothing is produced but the error message.

Don’t confuse the dependencies task on the root project with the dependencies task on subprojects.

I thought --info or --debug would produce the ‘as known’ dependency graph, calling out the failing node in the graph… That way the ‘needed by’ dependency would at least be known.

No, info and debug output has nothing to do with it, the dependencies output would show exactly that as I already said. If it actually would be a production dependency that causes your problem, which it is not.

:project:classpath

This configuration is the build script class path, not your production dependencies.
And as these cannot be resolved, of course your project cannot be configured as the message states.
For that dependency tree, use the buildEnvironment task.