You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karsten Tinnefeld (JIRA)" <ji...@codehaus.org> on 2011/06/01 13:26:22 UTC
[jira] Created: (MCHECKSTYLE-159) Optional treeWalker.cacheFile
property must not be required
Optional treeWalker.cacheFile property must not be required
-----------------------------------------------------------
Key: MCHECKSTYLE-159
URL: http://jira.codehaus.org/browse/MCHECKSTYLE-159
Project: Maven 2.x Checkstyle Plugin
Issue Type: Bug
Affects Versions: 2.6, 2.7
Reporter: Karsten Tinnefeld
Given a custom checkstyle configuration, checkstyle requires the property cacheFile to the TreeWalker module be configured, thus, the following configuration cannot go without the property line:
<module name="Checker">
[...]
<module name="TreeWalker">
<property name="cacheFile" value="$\{cachefile\}"/>
[...]
</module>
[...]
</module>
In case it is omitted, the tool exits with the following stack trace (shortened, regarding version 2.6):
[INFO] Error during page generation
Embedded error: Error rendering Maven report: Failed during checkstyle execution
missing key 'cacheFile' in TreeWalker
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error during page generation
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at
[...]
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)
... 28 more
Due to checkstyle documentation, the property is optional, and no cachefile will be used in case it is not specified (cf. http://checkstyle.sourceforge.net/config.html#TreeWalker). Also, cacheFile can be specified in the pom, thus it should be substituted anyway.
Workaround:
Add <configuration/>-Entry
<propertyExpansion>
cacheFile=${project.build.directory}/checkstyle-cachefile
</propertyExpansion>
and use the above property line and a special maven build version of the checkstyle configuration file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Work started: (MCHECKSTYLE-159) Optional
treeWalker.cacheFile property must not be required
Posted by "Daniel Kulp (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCHECKSTYLE-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on MCHECKSTYLE-159 started by Daniel Kulp.
> Optional treeWalker.cacheFile property must not be required
> -----------------------------------------------------------
>
> Key: MCHECKSTYLE-159
> URL: https://jira.codehaus.org/browse/MCHECKSTYLE-159
> Project: Maven 2.x Checkstyle Plugin
> Issue Type: Bug
> Affects Versions: 2.6, 2.7
> Reporter: Karsten Tinnefeld
> Assignee: Daniel Kulp
>
> Given a custom checkstyle configuration, checkstyle requires the property cacheFile to the TreeWalker module be configured, thus, the following configuration cannot go without the property line:
> <module name="Checker">
> [...]
> <module name="TreeWalker">
> <property name="cacheFile" value="$\{cachefile\}"/>
> [...]
> </module>
> [...]
> </module>
> In case it is omitted, the tool exits with the following stack trace (shortened, regarding version 2.6):
> [INFO] Error during page generation
> Embedded error: Error rendering Maven report: Failed during checkstyle execution
> missing key 'cacheFile' in TreeWalker
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error during page generation
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> at
> [...]
> 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)
> ... 28 more
> Due to checkstyle documentation, the property is optional, and no cachefile will be used in case it is not specified (cf. http://checkstyle.sourceforge.net/config.html#TreeWalker). Also, cacheFile can be specified in the pom, thus it should be substituted anyway.
> Workaround:
> Add <configuration/>-Entry
> <propertyExpansion>
> cacheFile=${project.build.directory}/checkstyle-cachefile
> </propertyExpansion>
> and use the above property line and a special maven build version of the checkstyle configuration file.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MCHECKSTYLE-159) Optional treeWalker.cacheFile
property must not be required
Posted by "Pierre Cardoso (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCHECKSTYLE-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=276454#comment-276454 ]
Pierre Cardoso commented on MCHECKSTYLE-159:
--------------------------------------------
Just wanted to say I only have this issue with version 2.7, not 2.6
> Optional treeWalker.cacheFile property must not be required
> -----------------------------------------------------------
>
> Key: MCHECKSTYLE-159
> URL: https://jira.codehaus.org/browse/MCHECKSTYLE-159
> Project: Maven 2.x Checkstyle Plugin
> Issue Type: Bug
> Affects Versions: 2.6, 2.7
> Reporter: Karsten Tinnefeld
>
> Given a custom checkstyle configuration, checkstyle requires the property cacheFile to the TreeWalker module be configured, thus, the following configuration cannot go without the property line:
> <module name="Checker">
> [...]
> <module name="TreeWalker">
> <property name="cacheFile" value="$\{cachefile\}"/>
> [...]
> </module>
> [...]
> </module>
> In case it is omitted, the tool exits with the following stack trace (shortened, regarding version 2.6):
> [INFO] Error during page generation
> Embedded error: Error rendering Maven report: Failed during checkstyle execution
> missing key 'cacheFile' in TreeWalker
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error during page generation
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> at
> [...]
> 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)
> ... 28 more
> Due to checkstyle documentation, the property is optional, and no cachefile will be used in case it is not specified (cf. http://checkstyle.sourceforge.net/config.html#TreeWalker). Also, cacheFile can be specified in the pom, thus it should be substituted anyway.
> Workaround:
> Add <configuration/>-Entry
> <propertyExpansion>
> cacheFile=${project.build.directory}/checkstyle-cachefile
> </propertyExpansion>
> and use the above property line and a special maven build version of the checkstyle configuration file.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MCHECKSTYLE-159) Optional treeWalker.cacheFile
property must not be required
Posted by "Filip van Laenen (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCHECKSTYLE-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=274817#comment-274817 ]
Filip van Laenen commented on MCHECKSTYLE-159:
----------------------------------------------
There's a small type in the Checkstyle configuration: the value of the property should have a capital F like this in order for the work-around to work:
<module name="Checker">
[...]
<module name="TreeWalker">
<property name="cacheFile" value="${cacheFile}"/>
[...]
</module>
[...]
</module>
> Optional treeWalker.cacheFile property must not be required
> -----------------------------------------------------------
>
> Key: MCHECKSTYLE-159
> URL: https://jira.codehaus.org/browse/MCHECKSTYLE-159
> Project: Maven 2.x Checkstyle Plugin
> Issue Type: Bug
> Affects Versions: 2.6, 2.7
> Reporter: Karsten Tinnefeld
>
> Given a custom checkstyle configuration, checkstyle requires the property cacheFile to the TreeWalker module be configured, thus, the following configuration cannot go without the property line:
> <module name="Checker">
> [...]
> <module name="TreeWalker">
> <property name="cacheFile" value="$\{cachefile\}"/>
> [...]
> </module>
> [...]
> </module>
> In case it is omitted, the tool exits with the following stack trace (shortened, regarding version 2.6):
> [INFO] Error during page generation
> Embedded error: Error rendering Maven report: Failed during checkstyle execution
> missing key 'cacheFile' in TreeWalker
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error during page generation
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> at
> [...]
> 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)
> ... 28 more
> Due to checkstyle documentation, the property is optional, and no cachefile will be used in case it is not specified (cf. http://checkstyle.sourceforge.net/config.html#TreeWalker). Also, cacheFile can be specified in the pom, thus it should be substituted anyway.
> Workaround:
> Add <configuration/>-Entry
> <propertyExpansion>
> cacheFile=${project.build.directory}/checkstyle-cachefile
> </propertyExpansion>
> and use the above property line and a special maven build version of the checkstyle configuration file.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (MCHECKSTYLE-159) Optional treeWalker.cacheFile
property must not be required
Posted by "Daniel Kulp (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MCHECKSTYLE-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp closed MCHECKSTYLE-159.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.8
> Optional treeWalker.cacheFile property must not be required
> -----------------------------------------------------------
>
> Key: MCHECKSTYLE-159
> URL: https://jira.codehaus.org/browse/MCHECKSTYLE-159
> Project: Maven 2.x Checkstyle Plugin
> Issue Type: Bug
> Affects Versions: 2.6, 2.7
> Reporter: Karsten Tinnefeld
> Assignee: Daniel Kulp
> Fix For: 2.8
>
>
> Given a custom checkstyle configuration, checkstyle requires the property cacheFile to the TreeWalker module be configured, thus, the following configuration cannot go without the property line:
> <module name="Checker">
> [...]
> <module name="TreeWalker">
> <property name="cacheFile" value="$\{cachefile\}"/>
> [...]
> </module>
> [...]
> </module>
> In case it is omitted, the tool exits with the following stack trace (shortened, regarding version 2.6):
> [INFO] Error during page generation
> Embedded error: Error rendering Maven report: Failed during checkstyle execution
> missing key 'cacheFile' in TreeWalker
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error during page generation
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> at
> [...]
> 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)
> ... 28 more
> Due to checkstyle documentation, the property is optional, and no cachefile will be used in case it is not specified (cf. http://checkstyle.sourceforge.net/config.html#TreeWalker). Also, cacheFile can be specified in the pom, thus it should be substituted anyway.
> Workaround:
> Add <configuration/>-Entry
> <propertyExpansion>
> cacheFile=${project.build.directory}/checkstyle-cachefile
> </propertyExpansion>
> and use the above property line and a special maven build version of the checkstyle configuration file.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira