[GRADLE-2876] Task "projectReport" fails with plugin "checkstyle" Created: 04/Sep/13  Updated: 07/Dec/16  Resolved: 07/Dec/16

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Fixed Votes: 1


 Description   

Task "projectReport" fails after gradle update (1.4 -> 1.7).

gradlew projectReport
:dependencyReport
:propertyReport
:taskReport FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':taskReport'.
    > Could not determine the dependencies of task ':checkstyleTest'.

But task "taskReport" (and dependencyReport, propertyReport) works fine.

gradlew taskReport
:taskReport

BUILD SUCCESSFUL

build.gradle

apply plugin: 'java'
apply plugin: 'project-report'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'application'
apply plugin: 'checkstyle'

...

dependencies.txt

...
checkstyle - The Checkstyle libraries to be used for this project.
No dependencies
...



 Comments   
Comment by Gradle Forums [ 04/Sep/13 ]

Should I create an issue at GitHub or [1]http://issues.gradle.org ?
----------------------------------------------------------------------------------------
[1] http://issues.gradle.org

Comment by Gradle Forums [ 04/Sep/13 ]

This forum is the right place to report issues. Can you provide the full stack trace?

Comment by Gradle Forums [ 04/Sep/13 ]

Minimal build.gradle

apply plugin: 'java'
apply plugin: 'project-report'
apply plugin: 'checkstyle'

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':taskReport'.
    > Could not determine the dependencies of task ':checkstyleTest'.
  • Try:
    Run with --info or --debug option to get more log output.
  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':taskReport'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:286)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:80)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTaskWithCacheLock(AbstractTaskPlanExecutor.java:58)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:47)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$1.run(DefaultTaskPlanExecutor.java:33)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:214)
    at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:276)
    at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:142)
    at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:78)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:31)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:89)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
    at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:48)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.Main.main(Main.java:39)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    Caused by: org.gradle.api.GradleException: Could not determine the dependencies of task ':checkstyleTest'.
    at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.resolve(CachingTaskDependencyResolveContext.java:65)
    at org.gradle.api.internal.tasks.AbstractTaskDependency.getDependencies(AbstractTaskDependency.java:27)
    at org.gradle.api.internal.tasks.DefaultTaskContainer$1.getNodeValues(DefaultTaskContainer.java:197)
    at org.gradle.api.internal.tasks.DefaultTaskContainer$1.getNodeValues(DefaultTaskContainer.java:195)
    at org.gradle.internal.graph.CachingDirectedGraphWalker$GraphWithEmpyEdges.getNodeValues(CachingDirectedGraphWalker.java:200)
    at org.gradle.internal.graph.CachingDirectedGraphWalker.doSearch(CachingDirectedGraphWalker.java:112)
    at org.gradle.internal.graph.CachingDirectedGraphWalker.findValues(CachingDirectedGraphWalker.java:64)
    at org.gradle.api.internal.tasks.DefaultTaskContainer.actualize(DefaultTaskContainer.java:195)
    at org.gradle.api.tasks.diagnostics.TaskReportTask.generate(TaskReportTask.java:64)
    at org.gradle.api.tasks.diagnostics.AbstractReportTask.generate(AbstractReportTask.java:67)
    at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:248)
    at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:136)
    at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
    at org.gradle.api.tasks.diagnostics.TaskReportTask_Decorated.invokeMethod(Unknown Source)
    at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:248)
    at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:136)
    at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
    at org.gradle.api.tasks.diagnostics.TaskReportTask_Decorated.invokeMethod(Unknown Source)
    at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:220)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:213)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:202)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:530)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:513)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 53 more
    Caused by: org.gradle.api.InvalidUserDataException: You can't change a configuration which is not in unresolved state!
    at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.throwExceptionIfNotInUnresolvedState(DefaultConfiguration.java:421)
    at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$500(DefaultConfiguration.java:45)
    at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$VetoContainerChangeAction.run(DefaultConfiguration.java:521)
    at org.gradle.api.internal.DefaultDomainObjectCollection.assertMutable(DefaultDomainObjectCollection.java:258)
    at org.gradle.api.internal.DefaultDomainObjectCollection.add(DefaultDomainObjectCollection.java:158)
    at org.gradle.api.internal.DelegatingDomainObjectSet.add(DelegatingDomainObjectSet.java:80)
    at org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.doAdd(DefaultDependencyHandler.groovy:66)
    at org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.this$2$doAdd(DefaultDependencyHandler.groovy)
    at org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.methodMissing(DefaultDependencyHandler.groovy:102)
    at org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.invokeMethod(DefaultDependencyHandler.groovy)
    at org.gradle.api.plugins.quality.CheckstylePlugin$_configureTaskDefaults_closure2_closure5_closure10.doCall(CheckstylePlugin.groovy:53)
    at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:58)
    at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:133)
    at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:94)
    at org.gradle.api.internal.project.AbstractProject.dependencies(AbstractProject.java:876)
    at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:248)
    at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:136)
    at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
    at org.gradle.api.internal.project.DefaultProject_Decorated.invokeMethod(Unknown Source)
    at org.gradle.api.plugins.quality.CheckstylePlugin$_configureTaskDefaults_closure2_closure5.doCall(CheckstylePlugin.groovy:52)
    at org.gradle.api.internal.ConventionAwareHelper$1.getValue(ConventionAwareHelper.java:75)
    at org.gradle.api.internal.ConventionAwareHelper$MappedPropertyImpl.getValue(ConventionAwareHelper.java:139)
    at org.gradle.api.internal.ConventionAwareHelper.getConventionValue(ConventionAwareHelper.java:117)
    at org.gradle.api.plugins.quality.Checkstyle_Decorated.getCheckstyleClasspath(Unknown Source)
    at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:248)
    at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:136)
    at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
    at org.gradle.api.plugins.quality.Checkstyle_Decorated.invokeMethod(Unknown Source)
    at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:248)
    at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:136)
    at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
    at org.gradle.api.plugins.quality.Checkstyle_Decorated.invokeMethod(Unknown Source)
    at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$PropertyInfo$4.create(AnnotationProcessingTaskFactory.java:448)
    at org.gradle.util.SingleMessageLogger.whileDisabled(SingleMessageLogger.java:162)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$PropertyInfo.getValue(AnnotationProcessingTaskFactory.java:446)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$Validator$1.call(AnnotationProcessingTaskFactory.java:256)
    at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:120)
    at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:75)
    at org.gradle.api.internal.file.collections.BuildDependenciesOnlyFileCollectionResolveContext$BuildableFileTreeInternalConverter.convertInto(BuildDependenciesOnlyFileCollectionResolveContext.java:50)
    at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:98)
    at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCollections(DefaultFileCollectionResolveContext.java:82)
    at org.gradle.api.internal.file.collections.BuildDependenciesOnlyFileCollectionResolveContext.resolveAsBuildables(BuildDependenciesOnlyFileCollectionResolveContext.java:43)
    at org.gradle.api.internal.file.CompositeFileCollection.addDependencies(CompositeFileCollection.java:136)
    at org.gradle.api.internal.file.CompositeFileCollection$3.resolve(CompositeFileCollection.java:124)
    at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext$TaskGraphImpl.getNodeValues(CachingTaskDependencyResolveContext.java:86)
    at org.gradle.internal.graph.CachingDirectedGraphWalker$GraphWithEmpyEdges.getNodeValues(CachingDirectedGraphWalker.java:200)
    at org.gradle.internal.graph.CachingDirectedGraphWalker.doSearch(CachingDirectedGraphWalker.java:112)
    at org.gradle.internal.graph.CachingDirectedGraphWalker.findValues(CachingDirectedGraphWalker.java:64)
    at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.doResolve(CachingTaskDependencyResolveContext.java:74)
    at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.resolve(CachingTaskDependencyResolveContext.java:63)
    ... 78 more
Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Mathias Kalb [ 03/Dec/16 ]

This issue can be closed.

Comment by Benjamin Muschko [ 07/Dec/16 ]

I tried out the reported setup with Gradle 3.2 and cannot observe a failed build.

Generated at Wed Jun 30 12:33:52 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.