After upgrading to 2.14-rc-2 we observe checkstyle task failing with exception:
Caused by: java.io.FileNotFoundException: /Users/sfaber/linkedin/tscp-targeting_trunk/targeting/tscp-targeting-api/config/checkstyle/checkstyle.xml
Full stack trace below. It could be that it’s our configuration of the checkstyle plugin causes the behavior. However, it works with Gradle 2.13 but stopped working with the 2.14. In the release notes I see there were changes in checkstyle task (conversion to java! yay!!!). I will dig more into this issue but if you have some pointers now it would be great.
We configure the Checkstyle task with custom ‘configFile’. Without digging deeper, could it be that in certain projects this configFile setting is no longer respected? Only some portion of our projects fails consistently with this exception with 2.14.
Thanks in advance for any pointers!!!
Full exception:
- Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:targeting:tscp-targeting-api:checkstyleMainGeneratedDataTemplate’.
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:66)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
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.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: : Unable to create a Checker: unable to find /Users/sfaber/linkedin/tscp-targeting_trunk/targeting/tscp-targeting-api/config/checkstyle/checkstyle.xml
at com.puppycrawl.tools.checkstyle.CheckStyleTask.createChecker(CheckStyleTask.java:383)
at com.puppycrawl.tools.checkstyle.CheckStyleTask.realExecute(CheckStyleTask.java:300)
at com.puppycrawl.tools.checkstyle.CheckStyleTask.execute(CheckStyleTask.java:262)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:78)
at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:371)
at org.gradle.internal.metaobject.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:166)
at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:163)
at org.gradle.api.internal.project.antbuilder.AntBuilderDelegate.nodeCompleted(AntBuilderDelegate.java:118)
at org.gradle.api.plugins.quality.Checkstyle$_run_closure1.doCall(Checkstyle.groovy:150)
at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67)
at org.gradle.api.internal.project.antbuilder.DefaultIsolatedAntBuilder$2.execute(DefaultIsolatedAntBuilder.java:145)
at org.gradle.api.internal.project.antbuilder.DefaultIsolatedAntBuilder$2.execute(DefaultIsolatedAntBuilder.java:127)
at org.gradle.api.internal.project.antbuilder.ClassPathToClassLoaderCache.withCachedClassLoader(ClassPathToClassLoaderCache.java:134)
at org.gradle.api.internal.project.antbuilder.DefaultIsolatedAntBuilder.execute(DefaultIsolatedAntBuilder.java:121)
at org.gradle.api.internal.project.IsolatedAntBuilder$execute$0.call(Unknown Source)
at org.gradle.api.plugins.quality.Checkstyle.run(Checkstyle.groovy:143)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:621)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:604)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
… 14 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: unable to find /Users/sfaber/linkedin/tscp-targeting_trunk/targeting/tscp-targeting-api/config/checkstyle/checkstyle.xml
at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:342)
at com.puppycrawl.tools.checkstyle.CheckStyleTask.createChecker(CheckStyleTask.java:356)
… 39 more
Caused by: java.io.FileNotFoundException: /Users/sfaber/linkedin/tscp-targeting_trunk/targeting/tscp-targeting-api/config/checkstyle/checkstyle.xml
at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:328)
… 40 more