Good day -
I’m trying to obtain the list of dependencies of a very large gradle project maintained by someone else.
The project builds OK by running ‘./gradlew’ , but the command ‘./gradlew listDependencies’ always fails.
It is configured to use gradle 1.12 , but I get the same error when running ‘gradle listDependencies’, where
gradle in $PATH resolves to gradle-2.4/bin/gradle (latest gradle release) - both versions produce this
stacktrace when run with the ‘-d -S’ option :
16:15:51.089 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 16:15:51.090 [ERROR] [org.gradle.BuildExceptionReporter] 16:15:51.090 [ERROR] [org.gradle.BuildExceptionReporter] * Where: 16:15:51.090 [ERROR] [org.gradle.BuildExceptionReporter] Build file '${REDACTED}/build.gradle' line: 11 16:15:51.090 [ERROR] [org.gradle.BuildExceptionReporter] 16:15:51.090 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 16:15:51.091 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred evaluating root project '$REDACTED'. 16:15:51.091 [ERROR] [org.gradle.BuildExceptionReporter] > org.gradle.api.tasks.compile.Compile 16:15:51.091 [ERROR] [org.gradle.BuildExceptionReporter] 16:15:51.092 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is: 16:15:51.092 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.GradleScriptException: A problem occurred evaluating root project '$REDACTED'. 16:15:51.092 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:76) 16:15:51.092 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$1.run(DefaultScriptPluginFactory.java:148) 16:15:51.093 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:156) 16:15:51.093 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:39) 16:15:51.093 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26) 16:15:51.093 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34) 16:15:51.094 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55) 16:15:51.094 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:487) 16:15:51.094 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:85) 16:15:51.094 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:42) 16:15:51.094 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35) 16:15:51.095 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:129) 16:15:51.095 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106) 16:15:51.095 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86) 16:15:51.095 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:90) 16:15:51.096 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) 16:15:51.096 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) 16:15:51.096 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41) 16:15:51.096 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28) 16:15:51.096 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:50) 16:15:51.097 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:27) 16:15:51.097 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:40) 16:15:51.097 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:169) 16:15:51.097 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237) 16:15:51.097 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210) 16:15:51.098 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35) 16:15:51.098 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) 16:15:51.098 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206) 16:15:51.098 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) 16:15:51.099 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) 16:15:51.099 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) 16:15:51.099 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:33) 16:15:51.099 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) 16:15:51.099 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54) 16:15:51.100 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) 16:15:51.100 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23) 16:15:51.100 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NoClassDefFoundError: org.gradle.api.tasks.compile.Compile 16:15:51.100 [ERROR] [org.gradle.BuildExceptionReporter] at com.synchronoss.gradle.core.java.JavaPlugin$_apply_closure2.class$(JavaPlugin.groovy) 16:15:51.101 [ERROR] [org.gradle.BuildExceptionReporter] at com.synchronoss.gradle.core.java.JavaPlugin$_apply_closure2.$get$$class$org$gradle$api$tasks$compile$Compile(JavaPlugin.groovy) 16:15:51.101 [ERROR] [org.gradle.BuildExceptionReporter] at com.synchronoss.gradle.core.java.JavaPlugin$_apply_closure2.doCall(JavaPlugin.groovy:20) 16:15:51.101 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67) 16:15:51.101 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:130) 16:15:51.101 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:91) 16:15:51.102 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:819) 16:15:51.102 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:824) 16:15:51.102 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:811) 16:15:51.102 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.Project$allprojects$1.call(Unknown Source) 16:15:51.103 [ERROR] [org.gradle.BuildExceptionReporter] at com.synchronoss.gradle.core.java.JavaPlugin.apply(JavaPlugin.groovy:19) 16:15:51.103 [ERROR] [org.gradle.BuildExceptionReporter] at com.synchronoss.gradle.core.java.JavaPlugin.apply(JavaPlugin.groovy) 16:15:51.103 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.ImperativeOnlyPluginApplicator.applyImperative(ImperativeOnlyPluginApplicator.java:35) 16:15:51.103 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.RuleBasedPluginApplicator.applyImperative(RuleBasedPluginApplicator.java:43) 16:15:51.103 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:144) 16:15:51.104 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:112) 16:15:51.104 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyType(DefaultObjectConfigurationAction.java:113) 16:15:51.104 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:36) 16:15:51.104 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:80) 16:15:51.104 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:136) 16:15:51.105 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:46) 16:15:51.105 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.plugins.PluginAware$apply.call(Unknown Source) 16:15:51.105 [ERROR] [org.gradle.BuildExceptionReporter] at com.synchronoss.gradle.core.java.JarPlugin.apply(JarPlugin.groovy:11) 16:15:51.105 [ERROR] [org.gradle.BuildExceptionReporter] at com.synchronoss.gradle.core.java.JarPlugin.apply(JarPlugin.groovy) 16:15:51.106 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.ImperativeOnlyPluginApplicator.applyImperative(ImperativeOnlyPluginApplicator.java:35) 16:15:51.106 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.RuleBasedPluginApplicator.applyImperative(RuleBasedPluginApplicator.java:43) 16:15:51.106 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:144) 16:15:51.106 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:112) 16:15:51.106 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyType(DefaultObjectConfigurationAction.java:113) 16:15:51.107 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:36) 16:15:51.107 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:80) 16:15:51.107 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:136) 16:15:51.107 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:46) 16:15:51.108 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.plugins.PluginAware$apply.call(Unknown Source) 16:15:51.108 [ERROR] [org.gradle.BuildExceptionReporter] at com.synchronoss.gradle.all.AllCorePlugins.apply(AllCorePlugins.groovy:22) 16:15:51.108 [ERROR] [org.gradle.BuildExceptionReporter] at com.synchronoss.gradle.all.AllCorePlugins.apply(AllCorePlugins.groovy) 16:15:51.108 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.ImperativeOnlyPluginApplicator.applyImperative(ImperativeOnlyPluginApplicator.java:35) 16:15:51.108 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.RuleBasedPluginApplicator.applyImperative(RuleBasedPluginApplicator.java:43) 16:15:51.109 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:144) 16:15:51.109 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:112) 16:15:51.109 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyType(DefaultObjectConfigurationAction.java:113) 16:15:51.109 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:36) 16:15:51.110 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:80) 16:15:51.110 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:136) 16:15:51.110 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:46) 16:15:51.110 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.plugins.PluginAware$apply.call(Unknown Source) 16:15:51.110 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34) 16:15:51.111 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.Script$apply$0.callCurrent(Unknown Source) 16:15:51.111 [ERROR] [org.gradle.BuildExceptionReporter] at build_7m9qwnppexmd11bzj4dw3u95x.run(/home/${REDACTED}/build.gradle:11) 16:15:51.111 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:74) 16:15:51.111 [ERROR] [org.gradle.BuildExceptionReporter] ... 35 more 16:15:51.112 [ERROR] [org.gradle.BuildExceptionReporter] 16:15:51.112 [LIFECYCLE] [org.gradle.BuildResultLogger] 16:15:51.112 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
Why, when I supplied the -S / --stacktrace option, does gradle still truncate the stacktrace ?
Can anyone suggest a method to list the dependencies of this project that might actually succeed ?
I’m now having to download the gradle source, and load gradle into a debugger with the ‘-d -S listDependencies’ arguments in the
current working directory of the project in order to debug why gradle is unable to produce a dependency list . I will share the results
when I have them, but is there any known workaround for the above issue ? Can anyone suggest what might be going wrong ?