[GRADLE-906] project-reports plugin broken Created: 13/Apr/10  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: 0.9-rc-1

Type: Bug
Reporter: Steve Appling Assignee: Hans Dockter
Resolution: Fixed Votes: 0


 Description   

The project-reports plugin seems to be broken currently. The AbstractReportTask.projects doesn't ever get set and you get an NPE whenever you try to run one of the reports. There is a todo comment in AbstractReportTask to add an annotation so the projects member would get set, but this seems to have been broken since last august, so I thought I should file a bug.

I added the following to the java quickstart sample:
apply plugin: 'project-reports'

running 'gradle dependencyReport -s' I get the following error:

Execution failed for task ':dependencyReport'.
	at org.gradle.api.internal.tasks.DefaultTaskExecuter.executeActions(DefaultTaskExecuter.java:63)
	at org.gradle.api.internal.tasks.DefaultTaskExecuter.execute(DefaultTaskExecuter.java:41)
	at org.gradle.api.internal.project.taskfactory.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:32)
	at org.gradle.api.internal.project.taskfactory.ExecutionShortCircuitTaskExecuter.execute(ExecutionShortCircuitTaskExecuter.java:48)
	at org.gradle.api.internal.tasks.SkipTaskExecuter.doExecute(SkipTaskExecuter.java:57)
	at org.gradle.api.internal.tasks.SkipTaskExecuter.execute(SkipTaskExecuter.java:35)
	at org.gradle.api.internal.tasks.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:32)
	at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:228)
	at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:165)
	at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:158)
	at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:77)
	at org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:161)
	at org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:54)
	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:179)
	at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:114)
	at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
	at org.gradle.launcher.Main.execute(Main.java:93)
	at org.gradle.launcher.Main.main(Main.java:42)
	at org.gradle.launcher.GradleMain.main(GradleMain.java:54)
Caused by: java.lang.NullPointerException: null
	at org.gradle.api.tasks.diagnostics.AbstractReportTask.generate(AbstractReportTask.java:57)
	at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:158)
	at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:93)
	at org.gradle.api.tasks.diagnostics.DependencyReportTask_Decorated.invokeMethod(Unknown Source)
	at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:26)
	at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:127)
	at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:125)
	at org.gradle.api.internal.tasks.DefaultTaskExecuter.executeActions(DefaultTaskExecuter.java:55)
	... 18 common frames omitted



 Comments   
Comment by Hans Dockter [ 19/Apr/10 ]

There was no default for which projects a report should be generated. The default is now the project where the plugin is applied to.

Generated at Wed Jun 30 11:41:58 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.