Re: Maven 3 with newest Checkstyle
I guess you mean you don't have any plugin tag in your pom.xml. Under build/plugins declare a plugin block like this to override the inherited version plugin artifactIdmaven-checkstyle-plugin/artifactId version6.3/version /plugin Btw, you should be aware that always pinning the plugin versions is a strongly recommended practice. Indeed, one of the biggest things maven promotes is build reproducibility, and not pinning plugins puts you at risk of having your build suddenly falling (or worse changing behavior unseen) because you changed your maven version, or some non standard plugin has just been released... Cheers Le 14 févr. 2015 02:24, Philipp Kraus philipp.kr...@flashpixx.de a écrit : Hello, I'm using Maven 3.2.5 and I would like to use the Checkstyle plugin in the newest version (6.3). The default installation is 5.8, so how can I add the 6.3 version of the plugin at my pom.xml and use it on the check goal at the validate phase? Thanks a lot Phil - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven 3 with newest Checkstyle 6.3
The configuration you did binds an execution to the validate phase. Calling checkstyle:checkstyle won't pick up this configuration. The error you get when calling mvn validate (or any later phase) is because RedundantThrowsCheck has been removed in Checkstyle 6.2 (according to Checkstyle release notes http://checkstyle.sourceforge.net/releasenotes.html). Vincent 2015-02-13 22:21 GMT+01:00 Philipp Kraus philipp.kr...@flashpixx.de: Thanks I have read these instructions, but check style uses the sun_checks.xml I have add to my build section: pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId version2.14/version dependencies dependency groupIdcom.puppycrawl.tools/groupId artifactIdcheckstyle/artifactId version6.3/version /dependency /dependencies /plugin /plugins /pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId version2.14/version executions execution idvalidate/id phasevalidate/phase configuration configLocationsrc/main/styleguide/style.xml/configLocation encodingUTF-8/encoding consoleOutputtrue/consoleOutput failsOnErrortrue/failsOnError /configuration goals goalcheck/goal /goals /execution /executions /plugin /plugins On running mvn check style:checkstyle I get: [WARNING] Unable to locate Source XRef to link to - DISABLED and it uses the sun_checks.xml On running mvn compile or package I get [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.14:check (validate) on project myProject: Failed during checkstyle configuration: cannot initialize module TreeWalker - Unable to instantiate RedundantThrows: Unable to instantiate RedundantThrowsCheck - [Help 1] so it seems that it uses the old 5.4 version. How can I fix this? I’m not confirm with the correct syntax semantic structure of the pom.xml Thanks Phil Am 13.02.2015 um 21:45 schrieb Vincent Latombe vincent.lato...@gmail.com : Hi, apply http://maven.apache.org/plugins/maven-checkstyle-plugin/usage.html#Checking_for_Violations_as_Part_of_the_Build and http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/upgrading-checkstyle.html Vincent 2015-02-13 21:28 GMT+01:00 Philipp Kraus philipp.kr...@flashpixx.de: Hello, I'm using Maven 3.2.5 and I would like to use the Checkstyle plugin in the newest version (6.3). The default installation is 5.8, so how can I add the 6.3 version of the plugin at my pom.xml and use it on the check goal at the validate phase? I don’t found the correct pom entries to do that. Thanks a lot Phil - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Maven 3 with newest Checkstyle 6.3
Hello, I'm using Maven 3.2.5 and I would like to use the Checkstyle plugin in the newest version (6.3). The default installation is 5.8, so how can I add the 6.3 version of the plugin at my pom.xml and use it on the check goal at the validate phase? I don’t found the correct pom entries to do that. Thanks a lot Phil - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven 3 with newest Checkstyle 6.3
Hi, apply http://maven.apache.org/plugins/maven-checkstyle-plugin/usage.html#Checking_for_Violations_as_Part_of_the_Build and http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/upgrading-checkstyle.html Vincent 2015-02-13 21:28 GMT+01:00 Philipp Kraus philipp.kr...@flashpixx.de: Hello, I'm using Maven 3.2.5 and I would like to use the Checkstyle plugin in the newest version (6.3). The default installation is 5.8, so how can I add the 6.3 version of the plugin at my pom.xml and use it on the check goal at the validate phase? I don’t found the correct pom entries to do that. Thanks a lot Phil - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven 3 with newest Checkstyle 6.3
Thanks I have read these instructions, but check style uses the sun_checks.xml I have add to my build section: pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId version2.14/version dependencies dependency groupIdcom.puppycrawl.tools/groupId artifactIdcheckstyle/artifactId version6.3/version /dependency /dependencies /plugin /plugins /pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId version2.14/version executions execution idvalidate/id phasevalidate/phase configuration configLocationsrc/main/styleguide/style.xml/configLocation encodingUTF-8/encoding consoleOutputtrue/consoleOutput failsOnErrortrue/failsOnError /configuration goals goalcheck/goal /goals /execution /executions /plugin /plugins On running mvn check style:checkstyle I get: [WARNING] Unable to locate Source XRef to link to - DISABLED and it uses the sun_checks.xml On running mvn compile or package I get [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.14:check (validate) on project myProject: Failed during checkstyle configuration: cannot initialize module TreeWalker - Unable to instantiate RedundantThrows: Unable to instantiate RedundantThrowsCheck - [Help 1] so it seems that it uses the old 5.4 version. How can I fix this? I’m not confirm with the correct syntax semantic structure of the pom.xml Thanks Phil Am 13.02.2015 um 21:45 schrieb Vincent Latombe vincent.lato...@gmail.com: Hi, apply http://maven.apache.org/plugins/maven-checkstyle-plugin/usage.html#Checking_for_Violations_as_Part_of_the_Build and http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/upgrading-checkstyle.html Vincent 2015-02-13 21:28 GMT+01:00 Philipp Kraus philipp.kr...@flashpixx.de: Hello, I'm using Maven 3.2.5 and I would like to use the Checkstyle plugin in the newest version (6.3). The default installation is 5.8, so how can I add the 6.3 version of the plugin at my pom.xml and use it on the check goal at the validate phase? I don’t found the correct pom entries to do that. Thanks a lot Phil - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Maven 3 with newest Checkstyle
Hello, I'm using Maven 3.2.5 and I would like to use the Checkstyle plugin in the newest version (6.3). The default installation is 5.8, so how can I add the 6.3 version of the plugin at my pom.xml and use it on the check goal at the validate phase? Thanks a lot Phil - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org