Re: problem with custom check in checkstyle plugin
Barrie Treloar wrote: On Feb 6, 2008 8:37 AM, Dennis Lundberg [EMAIL PROTECTED] wrote: Funny how things in the universe sometimes occur at the exact same time... Yesterday I completely rewrote the example about using custom checks for the Checkstyle plugin. It is now a complete example with all code necessary. It's not published yet, but you can (sort of) read it directly from svn [1] or you can check out the Checkstyle plugin and run 'mvn site' to build the docs yourself. [1] https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-developed-checkstyle.apt Please update the packagenames.xml to be the same as the one from within the checkstyle jar. I got stung with a problem because the Header check is not listed on the checkstyle web page but is listed within the jar file. OK, since I took the example file from their site, I probably need to update as well. I'll look into it. Including a note on verifying the contents of the checkstyle's package.xml would also be a good idea. But otherwise looks good. Thanks for checking! -- Dennis Lundberg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with custom check in checkstyle plugin
On Feb 9, 2008 9:03 AM, Dennis Lundberg [EMAIL PROTECTED] wrote: Barrie Treloar wrote: On Feb 6, 2008 8:37 AM, Dennis Lundberg [EMAIL PROTECTED] wrote: Funny how things in the universe sometimes occur at the exact same time... Yesterday I completely rewrote the example about using custom checks for the Checkstyle plugin. It is now a complete example with all code necessary. It's not published yet, but you can (sort of) read it directly from svn [1] or you can check out the Checkstyle plugin and run 'mvn site' to build the docs yourself. [1] https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-developed-checkstyle.apt Please update the packagenames.xml to be the same as the one from within the checkstyle jar. I got stung with a problem because the Header check is not listed on the checkstyle web page but is listed within the jar file. OK, since I took the example file from their site, I probably need to update as well. I'll look into it. I've already raised a patch request for that page. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with custom check in checkstyle plugin
On Feb 6, 2008 8:37 AM, Dennis Lundberg [EMAIL PROTECTED] wrote: Funny how things in the universe sometimes occur at the exact same time... Yesterday I completely rewrote the example about using custom checks for the Checkstyle plugin. It is now a complete example with all code necessary. It's not published yet, but you can (sort of) read it directly from svn [1] or you can check out the Checkstyle plugin and run 'mvn site' to build the docs yourself. [1] https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-developed-checkstyle.apt Please update the packagenames.xml to be the same as the one from within the checkstyle jar. I got stung with a problem because the Header check is not listed on the checkstyle web page but is listed within the jar file. Including a note on verifying the contents of the checkstyle's package.xml would also be a good idea. But otherwise looks good. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with custom check in checkstyle plugin
Funny how things in the universe sometimes occur at the exact same time... Yesterday I completely rewrote the example about using custom checks for the Checkstyle plugin. It is now a complete example with all code necessary. It's not published yet, but you can (sort of) read it directly from svn [1] or you can check out the Checkstyle plugin and run 'mvn site' to build the docs yourself. [1] https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-developed-checkstyle.apt Barrie Treloar wrote: On Sep 11, 2007 11:38 PM, Michael Fortin [EMAIL PROTECTED] wrote: Hello. I've been trying to get a custom check installed and can't get it run. I've followed the directions from the maven site almost to the letter but it keeps failing on the packagenames.xml. If I take my custom check out of the checkstyle.xml it still fails but on another check. It seems to find the file packagenames.xml but not load it. CLI output and files are below. Any help would be greatly appreciated. Did you solve this? I was having similar issues. maven file: ... build extensions extension groupIdcom.monetizeit/groupId artifactIdcheckstyle/artifactId version1.0-SNAPSHOT/version /extension /extensions Delete the extesions since it is not needed (I couldn't even get it to work), use a dependency in the build/plugins sections: e.g checkstyle:checkstyle-patch-1882332:4.3 contains my custom check. build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId dependencies dependency groupIdcheckstyle/groupId artifactIdcheckstyle-patch-1882332/artifactId version4.3/version /dependency /dependencies ... reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId configuration configLocationsrc/main/config/checkstyle.xml/configLocation packageNamesLocationsrc/main/config/checkstyle-packages.xml/packageNamesLocation /configuration /plugin /plugins /reporting Your reporting section is fine, but you may want to consider referencing a packagenames file which you bundle in with your custom check. Then you can remove the need to fully qualify your check in the checkstyle.xml e.g module name=com.monetizeit.checkstyle.BlanklineCheck / can become module name=BlanklineCheck / Once you put in package name=com.monetizeit.checkstyle/ into your packagenames.xml file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Dennis Lundberg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with custom check in checkstyle plugin
On Sep 11, 2007 11:38 PM, Michael Fortin [EMAIL PROTECTED] wrote: Hello. I've been trying to get a custom check installed and can't get it run. I've followed the directions from the maven site almost to the letter but it keeps failing on the packagenames.xml. If I take my custom check out of the checkstyle.xml it still fails but on another check. It seems to find the file packagenames.xml but not load it. CLI output and files are below. Any help would be greatly appreciated. Did you solve this? I was having similar issues. maven file: ... build extensions extension groupIdcom.monetizeit/groupId artifactIdcheckstyle/artifactId version1.0-SNAPSHOT/version /extension /extensions Delete the extesions since it is not needed (I couldn't even get it to work), use a dependency in the build/plugins sections: e.g checkstyle:checkstyle-patch-1882332:4.3 contains my custom check. build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId dependencies dependency groupIdcheckstyle/groupId artifactIdcheckstyle-patch-1882332/artifactId version4.3/version /dependency /dependencies ... reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId configuration configLocationsrc/main/config/checkstyle.xml/configLocation packageNamesLocationsrc/main/config/checkstyle-packages.xml/packageNamesLocation /configuration /plugin /plugins /reporting Your reporting section is fine, but you may want to consider referencing a packagenames file which you bundle in with your custom check. Then you can remove the need to fully qualify your check in the checkstyle.xml e.g module name=com.monetizeit.checkstyle.BlanklineCheck / can become module name=BlanklineCheck / Once you put in package name=com.monetizeit.checkstyle/ into your packagenames.xml file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with custom check in checkstyle plugin
Hello. I've been trying to get a custom check installed and can't get it run. I've followed the directions from the maven site almost to the letter but it keeps failing on the packagenames.xml. If I take my custom check out of the checkstyle.xml it still fails but on another check. It seems to find the file packagenames.xml but not load it. CLI output and files are below. Any help would be greatly appreciated. Thanks maven output: [EMAIL PROTECTED] mvn -e -X checkstyle:checkstyle + Error stacktraces are turned on. Maven version: 2.0.7 Java version: 1.6.0-dp OS name: mac os x version: 10.4.10 arch: ppc [DEBUG] Building Maven user-level plugin registry from: '/Users/michaelfortin/.m2/plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: '/java/maven/conf/plugin-registry.xml' [INFO] Scanning for projects... [DEBUG] Searching for parent-POM: com.monetizeit:monetizeit::1.0-a1 of project: com.monetizeit:foundation:ejb:3.0-a1 in relative path: ../pom.xml [DEBUG] Using parent-POM from the project hierarchy at: '../pom.xml' for project: com.monetizeit:foundation:ejb:3.0-a1 [INFO] Searching repository for plugin with prefix: 'checkstyle'. [DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins [DEBUG] Loading plugin prefixes from group: org.codehaus.mojo [DEBUG] maven-checkstyle-plugin: resolved to version 2.1 from repository central [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for project: null:maven-checkstyle-plugin:maven-plugin:2.1 from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.plugins:maven-plugins:pom:1 from the repository. [DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository. [DEBUG] Initialising extension: com.monetizeit:checkstyle [INFO] snapshot com.monetizeit:checkstyle:1.0-SNAPSHOT: checking for updates from spring [DEBUG] repository metadata for: 'snapshot com.monetizeit:checkstyle:1.0-SNAPSHOT' could not be found on repository: spring [INFO] snapshot com.monetizeit:checkstyle:1.0-SNAPSHOT: checking for updates from apache-snapshots [DEBUG] repository metadata for: 'snapshot com.monetizeit:checkstyle:1.0-SNAPSHOT' could not be found on repository: apache-snapshots [INFO] snapshot com.monetizeit:checkstyle:1.0-SNAPSHOT: checking for updates from central [DEBUG] repository metadata for: 'snapshot com.monetizeit:checkstyle:1.0-SNAPSHOT' could not be found on repository: central [DEBUG] checkstyle: using locally installed snapshot [DEBUG] com.monetizeit:foundation:ejb:3.0-a1 (selected for null) [DEBUG] checkstyle:checkstyle:jar:4.3:runtime (selected for runtime) [DEBUG] antlr:antlr:jar:2.7.6:runtime (selected for runtime) [DEBUG] commons-beanutils:commons-beanutils-core:jar:1.7.0:runtime (selected for runtime) [DEBUG] commons-logging:commons-logging:jar:1.0:runtime (selected for runtime) [DEBUG] commons-collections:commons-collections:jar:2.0:runtime (selected for runtime) [DEBUG] commons-cli:commons-cli:jar:1.0:runtime (selected for runtime) [DEBUG] commons-lang:commons-lang:jar:1.0:runtime (selected for runtime) [DEBUG] junit:junit:jar:3.7:runtime (selected for runtime) [DEBUG] commons-collections:commons-collections:jar:2.0:runtime (removed - nearer found: 2.1) [DEBUG] commons-collections:commons-collections:jar:2.1:runtime (selected for runtime) [DEBUG] commons-logging:commons-logging:jar:1.0:runtime (removed - nearer found: 1.0.3) [DEBUG] commons-logging:commons-logging:jar:1.0.3:runtime (selected for runtime) [DEBUG] com.monetizeit:checkstyle:jar:1.0-SNAPSHOT:runtime (selected for runtime) [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.4 for project: null:plexus-utils:jar:1.1 from the repository. [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.1:runtime (selected for runtime) [DEBUG] checkstyle: using locally installed snapshot [DEBUG] Adding to extension classpath: /Users/michaelfortin/.m2/repository/checkstyle/checkstyle/4.3/checkstyle-4.3.jar [DEBUG] Adding to extension classpath: /Users/michaelfortin/.m2/repository/commons-logging/commons-logging/1.0.3/commons-logging-1.0.3.jar [DEBUG] Adding to extension classpath: /Users/michaelfortin/.m2/repository/com/monetizeit/checkstyle/1.0-SNAPSHOT/checkstyle-1.0-SNAPSHOT.jar [DEBUG] Adding to extension classpath: /Users/michaelfortin/.m2/repository/commons-collections/commons-collections/2.1/commons-collections-2.1.jar [DEBUG] Adding to extension classpath: /Users/michaelfortin/.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar [DEBUG] Adding to extension classpath: /Users/michaelfortin/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar [DEBUG] Adding to extension classpath: /Users/michaelfortin/.m2/repository/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar