I have a problem with `pmd` plugin for `gradle` ... apply plugin: 'findbugs' apply plugin: 'jdepend' apply plugin: 'pmd'
convention.plugins.pmd.rulesets 'rulesets/basic.xml', 'rulesets/other.xml' buildscript { repositories { mavenCentral() } dependencies { classpath 'org.ajoberstar:gradle-plugins:0.1.1' } } dependencies { findbugs group:'com.google.code.findbugs', name:'findbugs', version:'2.0.0' findbugs group:'com.google.code.findbugs', name:'findbugs-ant', version:'2.0.0' pmd group:'pmd', name:'pmd', version:'4.2.5' jdepend group:'jdepend', name:'jdepend', version:'2.9.1' jdepend group:'org.apache.ant', name:'ant-jdepend', version:'1.7.1' } ... This code works fine in case gradle doesn't build `jar` otherwise I see this error: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':pmdMain'. Cause: Can't find resource rulesets/other.xml. Make sure the resource is a valid file or URL or is on the CLASSPATH. Here's the current classpath: C:\gradle-1.0-milestone-3\bin\..\lib\gradle-launcher-1.0-milestone-3.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:71) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:48) at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:34) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:55) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42) at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:237) at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:167) at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:160) at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:78) at org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:113) at org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:54) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:158) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:112) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:80) at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41) at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27) at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:32) at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:21) at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:219) at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:203) at org.gradle.launcher.Main.execute(Main.java:55) at org.gradle.launcher.Main.main(Main.java:40) at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:46) at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28) at org.gradle.launcher.GradleMain.main(GradleMain.java:24) Caused by: : Can't find resource rulesets/other.xml. Make sure the resource is a valid file or URL or is on the CLASSPATH. Here's the current classpath: C:\gradle-1.0-milestone-3\bin\..\lib\gradle-launcher-1.0-milestone-3.jar at net.sourceforge.pmd.ant.PMDTask.doTask(PMDTask.java:223) at net.sourceforge.pmd.ant.PMDTask.execute(PMDTask.java:334) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:71) at org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(BasicAntBuilder.java:86) at org.gradle.api.internal.project.DefaultAntBuilder.super$3$invokeMethod(DefaultAntBuilder.groovy) at org.gradle.api.internal.project.DefaultAntBuilder.invokeMethod(DefaultAntBuilder.groovy:37) at org.ajoberstar.gradle.pmd.PMD.check(PMD.groovy:72) at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:158) at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:93) at org.ajoberstar.gradle.pmd.PMD_Decorated.invokeMethod(Unknown Source) at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23) 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:127) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:63) ... 28 more BUILD FAILED -- View this message in context: http://gradle.1045684.n5.nabble.com/PMD-plugin-problem-tp5622918p5622918.html Sent from the gradle-user mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email