Apply checkstyle to custom checks

Craig Dickson <[email protected]> Tue, 3 Nov 2009 10:50:00 -0800
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <OFF6DF3645.09AFA82B-ON88257663.006661B1-88257663.0067749D@behr.com>
I am using the Maven Checkstyle plugin to apply Checkstyle to our code.

I have a custom configuration file packaged inside a Jar file and the 
Maven plugin is configured to depend on this jar file and hence pick up 
this custom config. This works fine.

However we now have some custom coded checks to extend Checkstyle. 
Currently these checks are being built and packaged into the same Jar file 
as the custom configuration file all as part of a single Maven jar 
project.

These custom checks work fine when applied to all other projects.

But we are having some trouble applying them to our custom coded checks. 
Basically the way Maven builds the project, it runs the Checkstyle check 
before it publishes the custom settings/checks jar to the local 
repository. This means that when the Checkstyle check is run, Maven picks 
up the latest version in the local repository, which will not match any 
changes we have just made. The end result is that our own custom checks 
are being checked against a configuration that is at least one version 
behind the latest.

Does anyone have a suggestion on how to better structure this Maven 
project so that we can make changes to the custom config file, or the 
custom coded checks and have those changes be immediately applied to the 
same project in the very next build? Perhaps some kind of multi-module 
setup, or maybe delaying the "check" goal until later in the build life 
cycle?

We have not written any custom PMD checks, but if we did, this same 
problem would crop up there as well (ie. trying to apply custom PMD 
settings to your own PMD custom checks).

Thanks

------------------------------------------------------------------------------
Craig Dickson
Software Engineering Manager
Behr Process Corporation
Santa Ana, California



_________________________
The information contained in this e-mail message may be proprietary, 
privileged, confidential or protected from disclosure. If you are not the 
intended recipient, any dissemination, distribution or copying is strictly 
prohibited. If you think that you have received this e-mail message in 
error, please e-mail the sender.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference

_______________________________________________
Checkstyle-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user