Hi,

I'm still struggling with this. As a reminder this is what happens:

* clover:instrument spawns a custom lifecycle which executes a maven build
till the install phase. The clover:instrumentInternal goal is called by this
custom lifecycle to instrument sources and to redirect maven's configuration
properties to point to the dir in target/ where clover has instrumented its
sources. This is a trick so that plugins running after
clover:instrumentInternal will operate on the clovered sources.

* If you pom is calling checkstyle:check then this goal is called as part of
the spawned lifecycle. The problem is that it'll check the clovered sources
and fail on it as clover's source code that is generated will not obey the
checkstyle rules.

I've tried to find a solution which only touches the clover plugin but I've
failed so far and I'm not sure I know enough about maven's internal.

One idea I had was to try hijacking the maven lifecycle execution from with
clover:instrumentInternal to prevent execution of well-known plugins such as
checkstyle but I wasn't able to find such a hook.

Another idea is to have two source sets for plugins to operate on: original
source and modified sources and plugins will choose on which one to operate.
However this requires some change to maven core and maybe a medium to long
term solution. However I need to find a solution now as people are not able
to use the plugin if they have checks (checkstyle:check, pmd:check,
clirr:check, etc).

Now the only idea I have at this point would be to
modify the checkstyle, pmd, clirr, findbugs plugins so that they don't run
if they are executed within the clover lifecycle. This is easy to check for.
I don't like the fact that this ties some artificial dependency between
those plugins and clover but that would be only temporary while we find a
proper designed solution (which would probably take much longer to
implement).

WDYT?

Thanks
-Vincent


        

        
                
___________________________________________________________________________ 
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet 
! 
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos 
expériences. 
http://fr.answers.yahoo.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to