Yep.  When you specifically activate a profile via the command line, all 
the "activeByDefault" profiles are deactivated.   Thus, if you have the 
checks in an activeByDefault profile, they will run when you just 
type "mvn", but when you run -Pnochecks, the nochecks profile activates 
instead of the "checks" profile and the checks don't run.   In this 
case, the "nochecks" profile is empty in that it doesn't configure 
anything.

CXF does it that way and it works really well.   The "hard core" 
developers know about -Pnochecks and -Pfastinstall (fastinstall also 
skips the tests) and use them.   However, the "getting starting" people 
run mvn which executes the checks.   This makes sure patches that they 
submit are formatted correctly and such which makes applying the patches 
easier.

For CXF, we also have a -Psetup.eclipse profile that REALLY gets things 
setup in eclipse. (goes way beyond eclipse:eclipse)   It injects the CXF 
checkstyle rules into the workspace, sets the workspace warning levels 
appropriately, injects the code format template, import order, etc....   
For each project, it also sets up Checkstyle and PMD (assumes you have 
the checkstyle and PMD plugins installed).     Thus eclipse does all the 
code format checks for me.    Thus, I usually run with -Pnochecks.

Dan


On Thursday 26 July 2007 04:29, Guillaume Nodet wrote:
> I'm sure Dan Kulp can comment on that but it seems that the profile
> which contains the checks is disabled when the empty one is activated.
>
> On 7/26/07, Bruce Snyder <[EMAIL PROTECTED]> wrote:
> > On 7/26/07, Guillaume Nodet <[EMAIL PROTECTED]> wrote:
> > > As the profile is empty it simply means that the checks wont be
> > > configured and activated :-)
> >
> > How does an empty profile prevent the invocation of Checkstyle and
> > PMD? Sounds like Maven voodoo.
> >
> > Bruce
> > --
> > perl -e 'print
> > unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> > );'
> >
> > Apache Geronimo - http://geronimo.apache.org/
> > Apache ActiveMQ - http://activemq.org/
> > Apache ServiceMix - http://servicemix.org/
> > Castor - http://castor.org/

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to