[GRADLE-2829] using JacocoMerge throws error "You can't map a property that does not exist: propertyName=destFile" Created: 08/Jul/13  Updated: 09/Jul/13  Resolved: 09/Jul/13

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

Type: Bug
Reporter: Gradle Forums Assignee: Luke Daley
Resolution: Fixed Votes: 0


 Description   

After upgrading Gradle from 1.6 to 1.7-rc-1, Gradle fails to evaluate build files with JacocoMerge tasks.

  • What went wrong:
    A problem occurred evaluating root project 'gradle-test'.
    > Failed to notify action.
    > You can't map a property that does not exist: propertyName=destFile

build.gradle:

apply plugin: 'jacoco'

task merge(type: JacocoMerge) {
}

This problem is probably caused by [JacocoPlugin]([1]https://github.com/gradle/gradle/blob...), which is using destFile instead of destinationFile.
----------------------------------------------------------------------------------------
[1] https://github.com/gradle/gradle/blob/master/subprojects/jacoco/src/main/groovy/org/gradle/testing/jacoco/plugins/JacocoPlugin.groovy#L89



 Comments   
Comment by Gradle Forums [ 08/Jul/13 ]

Can you run with -s and paste the stacktrace please.

Comment by Gradle Forums [ 08/Jul/13 ]

org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'gradle-test'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:131)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:38)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:25)
at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:469)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:77)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:31)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
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.listener.ListenerNotificationException: Failed to notify action.
at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:90)
at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy6.execute(Unknown Source)
at org.gradle.listener.ActionBroadcast.execute(ActionBroadcast.java:30)
at org.gradle.api.internal.DefaultDomainObjectCollection.doAdd(DefaultDomainObjectCollection.java:164)
at org.gradle.api.internal.DefaultDomainObjectCollection.add(DefaultDomainObjectCollection.java:159)
at org.gradle.api.internal.DefaultNamedDomainObjectCollection.add(DefaultNamedDomainObjectCollection.java:71)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:68)
at org.gradle.api.internal.project.AbstractProject.task(AbstractProject.java:912)
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.groovy.scripts.BasicScript.methodMissing(BasicScript.java:83)
at build_5hjoeto7a1vo1uhnrsn5uton1a.run(****/gradle-test/build.gradle:3)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
... 33 more
Caused by: org.gradle.api.InvalidUserDataException: You can't map a property that does not exist: propertyName=destFile
at org.gradle.api.internal.ConventionAwareHelper.map(ConventionAwareHelper.java:59)
at org.gradle.api.internal.ConventionAwareHelper.map(ConventionAwareHelper.java:69)
at org.gradle.api.internal.ConventionAwareHelper.propertyMissing(ConventionAwareHelper.java:97)
at org.gradle.testing.jacoco.plugins.JacocoPlugin$_configureDefaultOutputPathForJacocoMerge_closure3.doCall(JacocoPlugin.groovy:89)
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:113)
at org.gradle.api.internal.AbstractTask.configure(AbstractTask.java:436)
at org.gradle.api.internal.AbstractTask.configure(AbstractTask.java:59)
at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:50)
at org.gradle.api.internal.Actions$FilteredAction.execute(Actions.java:203)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:81)
... 48 more

Comment by Gradle Forums [ 08/Jul/13 ]

After changing destFile to destinationFile in JacocoPlugin.configureDefaultOutputPathForJacocoMerge and recompiling Gradle, everything seems to work fine.

Comment by Gradle Forums [ 08/Jul/13 ]

Well caught. The JaCoCo plugin is still @incubating, which means it is subject to non-backward-compatible changes. It's always worth checking the "Potential Breaking Changes" section of the release notes: [1]http://www.gradle.org/docs/release-ca....
----------------------------------------------------------------------------------------
[1] http://www.gradle.org/docs/release-candidate/release-notes#incubating-jacoco-plugin-changes

Comment by Gradle Forums [ 08/Jul/13 ]

Maybe I wasn't clear.

This issue is caused by [one occurrence of *destFile*]([1]https://github.com/gradle/gradle/blob...) which hasn't been changed to destinationFile in [b6bed9d2]([2]https://github.com/gradle/gradle/comm...).
----------------------------------------------------------------------------------------
[1] https://github.com/gradle/gradle/blob/release/subprojects/jacoco/src/main/groovy/org/gradle/testing/jacoco/plugins/JacocoPlugin.groovy#L89
[2] https://github.com/gradle/gradle/commit/b6bed9d225961f6729d7126f1817c87c202fdb0f

Comment by Gradle Forums [ 08/Jul/13 ]

Thanks Artur. We'll fix this for the next RC and final release.

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