We are getting an error during a build because a jar file is not found in our artifactory repo but we dont directly add it as a dependency. How do I find out which of our direct dependencies is including that as a dependency?
I tried doing a --write-locks build so that I could find the culprit but it cant get past the error to write the dependencies.lock file
I also tried ./gradlew build --scan and ./gradlew dependencies but both stop when the error happens trying to get the missing jar. Seems like there is no way to find out which of my dependencies is including the offending jar… there has to be a way.
@rickfish1 usual ./gradlew dependencies should still succeed and show you where the problem is in the dependency graph. What error are you seeing when running it?
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
‘:classpath’ is the classpath of the build itself (the applied plugins with their dependencies). That explains why you can’t run anything. Gradle already fails during configuring the build.
You can try the buildEnvironment task. Is similar to dependencies but for the classpath of the build.