[GRADLE-848] gradle -r fails with java.lang.UnsupportedOperationException Created: 09/Mar/10  Updated: 04/Jan/13  Resolved: 24/Nov/10

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

Type: Bug
Reporter: Tomek Kaczanowski Assignee: Hans Dockter
Resolution: Fixed Votes: 0


 Description   

for a minimal (almost empty build.gradle file):
apply id: 'java'
apply id: 'eclipse'

execution of
gradle -r
ends with:

...
[long list of properties here]
...
repositories: org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler_Decorated@175b7f9
repositoryHandlerFactory: org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandlerFactory@181497d
rootDir: /home/tomek/Documents/szkolenia/2010_03_sfi_gradle/001_simple
rootProject: root project '001_simple'
rules:

FAILURE: Build failed with an exception.

  • Where:
    Build file '/home/tomek/Documents/szkolenia/2010_03_sfi_gradle/001_simple/build.gradle'
  • What went wrong:
    Execution failed for task ':report'.
    Cause: java.lang.UnsupportedOperationException (no error message)
  • Try:
    Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.

BUILD FAILED

full stacktrace:
org.gradle.api.tasks.LocationAwareTaskExecutionException: Build file '/home/tomek/Documents/szkolenia/2010_03_sfi_gradle/001_simple/build.gradle'
Execution failed for task ':report'.
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:49)
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:222)
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.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
at org.gradle.execution.BuiltInTasksBuildExecuter.execute(BuiltInTasksBuildExecuter.java:112)
at org.gradle.GradleLauncher.doBuildStages(GradleLauncher.java:198)
at org.gradle.GradleLauncher.doBuild(GradleLauncher.java:133)
at org.gradle.GradleLauncher.run(GradleLauncher.java:103)
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.UnsupportedOperationException: null
at $Proxy11.toString(Unknown Source)
at org.gradle.api.tasks.diagnostics.PropertyReportRenderer.addProperty(PropertyReportRenderer.java:37)
at org.gradle.api.tasks.diagnostics.PropertyReportTask.generate(PropertyReportTask.java:44)
at org.gradle.api.tasks.diagnostics.AbstractReportTask.generate(AbstractReportTask.java:50)
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.PropertyReportTask_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:129)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:128)
at org.gradle.api.internal.tasks.DefaultTaskExecuter.executeActions(DefaultTaskExecuter.java:55)
... 18 common frames omitted

BUILD FAILED

Total time: 4.677 secs



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

Hi Tomek,

I can't reproduce this (any more?).

With the following build script:

apply plugin: 'java'
apply plugin: 'eclipse'

gradle -r runs successfully.

Please reopen the issue if you still encounter this problem.

Comment by Tomek Kaczanowski [ 01/Jun/10 ]

I reproduced it with gradle-0.9-preview-2 with the following build script:

apply plugin: 'java'
apply plugin: 'eclipse'

repositories {
mavenCentral()
}

dependencies {
testCompile 'junit:junit:4.8.1'
}

Comment by Bas Kok [ 23/Jun/10 ]

I can verify this also fails for me

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