I have tried all the recommended solutions thus far and none worked. The exception is not coming from Checkstyle, at least not as far as I can tell. I debugged the maven plugin (2.9.1) and I am using the latest checkstyle, 5.5. The call to executeReport in AbstractMavenReport is where the error is thrown. The actual check process completed. I don't think this is a checkstyle error but I'm not certain yet.
Grant On Wed, Apr 11, 2012 at 10:59 PM, Wayne Fay <[email protected]> wrote: > Disclaimer: I don't use Checkstyle as a primary component in my builds. > > > <property name="cacheFile" value="${checkstyle.cache.file}"/> > > <property name="cacheFile" value="${cacheFile}"/> > > Did you try leaving cacheFile out entirely? Did you try setting > value=""? Samples at the Checkstyle site show > value="target/cachefile", did you try that? > > > not sure why the plugin is complaining about it. Appreciate any thoughts > > before I opt for looking into the plugin source code. > ... > > Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: > missing > > key 'cacheFile' in TreeWalker > > at > > > com.puppycrawl.tools.checkstyle.DefaultConfiguration.getAttribute(DefaultConfiguration.java:74) > > at > > > org.apache.maven.plugin.checkstyle.DefaultCheckstyleExecutor.getConfiguration(DefaultCheckstyleExecutor.java:270) > > I doubt looking at the Maven checkstyle plugin source code will be > much help. The stacktrace shows a root cause in > com.puppycrawl.tools.checkstyle which I assume is part of Checkstyle > itself. And I further assume the plugin simply calls out to Checkstyle > and provides configuration etc so it can run properly (which is how > most plugins work, thin wrappers around a larger codebase to integrate > the tool into Maven's build process). > > If you're looking at any source code, look at the Checkstyle source > itself specifically DefaultConfiguration.getAttribute() line 74. (But > you'll need to figure out which version of the binary is being used.) > > You probably need to take this email over to the Checkstyle support > channels directly since their code is throwing this exception, not > Maven and not the plugin. > > Wayne > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
