1.7-rc-1: You can't map a property that does not exist: propertyName=destFile


(Artur Kotyrba) #1

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, which is using destFile instead of destinationFile.


(Luke Daley) #2

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


(Artur Kotyrba) #3
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

(Artur Kotyrba) #4

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


#5

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: http://www.gradle.org/docs/release-candidate/release-notes#incubating-jacoco-plugin-changes.


(Artur Kotyrba) #6

Maybe I wasn’t clear.

This issue is caused by one occurrence of destFile which hasn’t been changed to destinationFile in b6bed9d2.


(Luke Daley) #7

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