Could it be that you are empacted by

http://jira.codehaus.org/browse/MCHECKSTYLE-142

I guess not all maven properties are accessible in the checkstyle 
configuration. Depending on how you defined the cacheFile or 
checkstyle.cache.file properties, they may not be visible to checkstyle.

Kind regards,
Joachim


On 12-04-12 04:59, Wayne Fay 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: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to