PMD task fails in Gradle 2.0 if the rule file references a preset ruleset


(Dimitar Dimitrov) #1

See title - used to work in Gradle 1.x and now it fails with the exception below.

A small build to reproduce it: https://gist.github.com/ddimtirov/fa2e1151c90f97f42c80

Exception: [ant:pmd] net.sourceforge.pmd.RuleSetNotFoundException: Can’t find resource rulesets/basic.xml. Make sure the resource is a valid file or URL and is on the CLASSPATH. Here’s the current classpath: C:\UBS\dev\pkg\gradle\bin…\lib\gradle-la uncher-2.0-rc-1.jar [ant:pmd]

at net.sourceforge.pmd.RuleSetReferenceId.getInputStream(RuleSetReferenceId.java:315) [ant:pmd]

at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:161) [ant:pmd]

at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:297) [ant:pmd]

at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:259) [ant:pmd]

at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:216) [ant:pmd]

at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:161) [ant:pmd]

at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:126) [ant:pmd]

at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:111) [ant:pmd]

at net.sourceforge.pmd.ant.PMDTask.doTask(PMDTask.java:173) [ant:pmd]

at net.sourceforge.pmd.ant.PMDTask.execute(PMDTask.java:321) [ant:pmd]

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) [ant:pmd]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ant:pmd]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [ant:pmd]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [ant:pmd]

at java.lang.reflect.Method.invoke(Method.java:597) [ant:pmd]

at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [ant:pmd]

at groovy.util.AntBuilder.performTask(AntBuilder.java:319) [ant:pmd]

at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:264) [ant:pmd]

at org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:71) [ant:pmd]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ant:pmd]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [ant:pmd]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [ant:pmd]

at java.lang.reflect.Method.invoke(Method.java:597) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:230) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:55) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) [ant:pmd]

at org.gradle.api.internal.project.AntBuilderDelegate.nodeCompleted(DefaultIsolatedAntBuilder.groovy:176) [ant:pmd]

at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147) [ant:pmd]

at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) [ant:pmd]

at org.gradle.api.plugins.quality.Pmd$_run_closure2.doCall(Pmd.groovy:109) [ant:pmd]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ant:pmd]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [ant:pmd]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [ant:pmd]

at java.lang.reflect.Method.invoke(Method.java:597) [ant:pmd]

at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) [ant:pmd]

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) [ant:pmd]

at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) [ant:pmd]

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909) [ant:pmd]

at groovy.lang.Closure.call(Closure.java:423) [ant:pmd]

at groovy.lang.Closure.call(Closure.java:439) [ant:pmd]

at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:59) [ant:pmd]

at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:130) [ant:pmd]

at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:91) [ant:pmd]

at org.gradle.util.ConfigureUtil$configure.call(Unknown Source) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) [ant:pmd]

at org.gradle.api.internal.project.DefaultIsolatedAntBuilder.execute(DefaultIsolatedAntBuilder.groovy:116) [ant:pmd]

at org.gradle.api.internal.project.IsolatedAntBuilder$execute$0.call(Unknown Source) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) [ant:pmd]

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) [ant:pmd]

at org.gradle.api.plugins.quality.Pmd.run(Pmd.groovy:107) [ant:pmd]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ant:pmd]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [ant:pmd]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [ant:pmd]

at java.lang.reflect.Method.invoke(Method.java:597) [ant:pmd]

at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63) [ant:pmd]

at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218) [ant:pmd]

at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211) [ant:pmd]

at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200) [ant:pmd]

at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:570) [ant:pmd]

at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:553) [ant:pmd]

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) [ant:pmd]

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) [ant:pmd]

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) [ant:pmd]

at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) [ant:pmd]

at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) [ant:pmd]

at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) [ant:pmd]

at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) [ant:pmd]

at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) [ant:pmd]

at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) [ant:pmd]

at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) [ant:pmd]

at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:296) [ant:pmd]

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79) [ant:pmd]

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63) [ant:pmd]

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51) [ant:pmd]

at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23) [ant:pmd]

at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86) [ant:pmd]

at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29) [ant:pmd]

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61) [ant:pmd]

at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) [ant:pmd]

at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67) [ant:pmd]

at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) [ant:pmd]

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61) [ant:pmd]

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54) [ant:pmd]

at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:148) [ant:pmd]

at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:105) [ant:pmd]

at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:85) [ant:pmd]

at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:81) [ant:pmd]

at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33) [ant:pmd]

at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24) [ant:pmd]

at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:39) [ant:pmd]

at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29) [ant:pmd]

at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50) [ant:pmd]

at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171) [ant:pmd]

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237) [ant:pmd]

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210) [ant:pmd]

at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35) [ant:pmd]

at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) [ant:pmd]

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206) [ant:pmd]

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) [ant:pmd]

at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) [ant:pmd]

at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) [ant:pmd]

at org.gradle.launcher.Main.doAction(Main.java:33) [ant:pmd]

at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) [ant:pmd]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ant:pmd]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [ant:pmd]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [ant:pmd]

at java.lang.reflect.Method.invoke(Method.java:597) [ant:pmd]

at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54) [ant:pmd]

at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) [ant:pmd]

at org.gradle.launcher.GradleMain.main(GradleMain.java:23) :pmdMain FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:pmdMain’. > java.lang.RuntimeException: Couldn’t find the class Can’t find resource rulesets/basic.xml. Make sure the resource is a valid file or URL and is on the CLASSPATH. Here’s the current classpath: C:\UBS\dev\pkg\gradle\bin…\lib\gradle-laun cher-2.0-rc-1.jar

  • Try: Run with --info or --debug option to get more log output.

  • Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:pmdMain’.

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)

at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)

at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)

at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)

at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)

at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)

at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)

at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)

at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:296)

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)

at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)

at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)

at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)

at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)

at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)

at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)

at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:148)

at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:105)

at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:85)

at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:81)

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:39)

at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29)

at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)

at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)

at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)

at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)

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:33)

at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)

at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)

at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)

at org.gradle.launcher.GradleMain.main(GradleMain.java:23) Caused by: : java.lang.RuntimeException: Couldn’t find the class Can’t find resource rulesets/basic.xml. Make sure the resource is a valid file or URL and is on the CLASSPATH. Here’s the current classpath: C:\UBS\dev\pkg\gradle\bin…\lib\ gradle-launcher-2.0-rc-1.jar

at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)

at org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:71)

at org.gradle.api.internal.project.AntBuilderDelegate.nodeCompleted(DefaultIsolatedAntBuilder.groovy:176)

at org.gradle.api.plugins.quality.Pmd$_run_closure2.doCall(Pmd.groovy:109)

at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:59)

at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:130)

at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:91)

at org.gradle.util.ConfigureUtil$configure.call(Unknown Source)

at org.gradle.api.internal.project.DefaultIsolatedAntBuilder.execute(DefaultIsolatedAntBuilder.groovy:116)

at org.gradle.api.internal.project.IsolatedAntBuilder$execute$0.call(Unknown Source)

at org.gradle.api.plugins.quality.Pmd.run(Pmd.groovy:107)

at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)

at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)

at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)

at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)

at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:570)

at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:553)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)

… 44 more Caused by: java.lang.RuntimeException: Couldn’t find the class Can’t find resource rulesets/basic.xml. Make sure the resource is a valid file or URL and is on the CLASSPATH. Here’s the current classpath: C:\UBS\dev\pkg\gradle\bin…\lib\gr adle-launcher-2.0-rc-1.jar

at net.sourceforge.pmd.RuleSetFactory.classNotFoundProblem(RuleSetFactory.java:244)

at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:234)

at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:161)

at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:126)

at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:111)

at net.sourceforge.pmd.ant.PMDTask.doTask(PMDTask.java:173)

at net.sourceforge.pmd.ant.PMDTask.execute(PMDTask.java:321)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)

at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)

… 62 more


(Dimitar Dimitrov) #2

Possibly related is that the groovydoc task fails for projects that don’t include the ‘groovy-ant’ module as project dependency. As the Gradle distribution contains the ‘groovy-all’ jar, I would expect all tools to resolve their dependencies from there…

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':zone:groovydoc'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
        ... snipped a lot of irrelevant stack frames
        at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
Caused by: java.lang.NoClassDefFoundError: groovy/util/AntBuilder
        at java_lang_ClassLoader$loadClass.call(Unknown Source)
        at org.gradle.api.internal.project.DefaultIsolatedAntBuilder.execute(DefaultIsolatedAntBuilder.groovy:106)
        at org.gradle.api.internal.project.IsolatedAntBuilder$execute$1.call(Unknown Source)
        at org.gradle.api.tasks.javadoc.AntGroovydoc.execute(AntGroovydoc.groovy:55)
        at org.gradle.api.tasks.javadoc.Groovydoc.generate(Groovydoc.java:75)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:570)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:553)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
        ... 66 more
Caused by: java.lang.ClassNotFoundException: groovy.util.AntBuilder
        ... 79 more

(Peter Niederwieser) #3

Ruleset names changed in PMD 5.x. Can you please double-check that this is indeed a problem with Gradle 2.0 vs. 1.12.


(Dimitar Dimitrov) #4

Indeed - ‘rulesets/basic.xml’ moved to ‘rulesets/java/basic.xml’. It is worth mentioning in the release notes as it is going to impact pretty much everybody.

How about the Groovydoc issue? Or shall I create a separate thread for it?


(Peter Niederwieser) #5

Is the PMD change related to Gradle 2.0? Please create a separate topic for the Groovydoc issue.


(Dimitar Dimitrov) #6

Gradle 2.0 changes the default version of PMD used by the plugin. This change is mentioned in the release notes, but you may want to add that this also entails a change in the ruleset names.


(Peter Niederwieser) #7

Thanks. I added a note.