Problem with htmlDependencyReport in 1.10


(Anders Brolien) #1

When running dependencyReport I’m getting an internal gradle error:

org.gradle.api.internal.artifacts.component.DefaultProjectComponentIdentifier cannot be cast to org.gradle.api.artifacts.component.ModuleComponentIdentifier

I’m I the only one experiencing this kind of problem? The module I’m running the task on has both project and artifact dependencies. I have applied the maven plugin and artifact dependencies are snapshot ones. It works when running on modules with only project dependencies.

It worked in 1.9 for the same module, with the same dependencies.

Thus seems to originate from:

Caused by: java.lang.ClassCastException: org.gradle.api.internal.artifacts.component.DefaultProjectComponentIdentifier cannot be cast to org.gradle.api.artifacts.component.ModuleComponentIdentifier
 at org.gradle.api.reporting.dependencies.internal.StrictDependencyResultSpec.matchesSelected(StrictDependencyResultSpec.java:51)
 at org.gradle.api.reporting.dependencies.internal.StrictDependencyResultSpec.isSatisfiedBy(StrictDependencyResultSpec.java:38)
 at org.gradle.api.reporting.dependencies.internal.StrictDependencyResultSpec$isSatisfiedBy.call(Unknown Source)
 at org.gradle.api.reporting.dependencies.internal.JsonProjectDependencyRenderer$_createInsight_closure4.doCall(JsonProjectDependencyRenderer.groovy:204)
 at sun.reflect.GeneratedMethodAccessor1649.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
 at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
 at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
 at groovy.lang.Closure.call(Closure.java:412)
 at groovy.lang.Closure.call(Closure.java:425)
 at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:58)
 at org.gradle.api.internal.artifacts.result.DefaultResolutionResult.eachElement(DefaultResolutionResult.java:72)
 at org.gradle.api.internal.artifacts.result.DefaultResolutionResult.allDependencies(DefaultResolutionResult.java:57)
 at org.gradle.api.internal.artifacts.result.DefaultResolutionResult.allDependencies(DefaultResolutionResult.java:61)
 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver$ErrorHandlingResolutionResult.allDependencies(ErrorHandlingArtifactDependencyResolver.java:132)
 at org.gradle.api.artifacts.result.ResolutionResult$allDependencies.call(Unknown Source)
 at org.gradle.api.reporting.dependencies.internal.JsonProjectDependencyRenderer.createInsight(JsonProjectDependencyRenderer.groovy:203)

(Benjamin Muschko) #2

Thanks for reporting this issue. We already identified the issue, GRADLE-2979, and will provide a fix with version 1.11-rc-1.