I looked at this before and went away to think about it. I don't like the suggestion of modifying the other plugins - I think we might just have to live with this as a limitation and ensure that it is properly considered in Maven 2.1. We could get that particular topic underway for discussion if you are interested.

WDYT?

- Brett

On 7/08/2006 3:30 AM, Vincent Massol wrote:
Ping. Any idea on this? I'd love to be able to fix this big issue...

Thanks
-Vincent

-----Original Message-----
From: Vincent Massol [mailto:[EMAIL PROTECTED]
Sent: lundi 24 juillet 2006 12:04
To: 'Maven Developers List'
Subject: [Design issue] How can the clover plugin play nicely with plugins
doing source checks?

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






__________________________________________________________________________
_
Dicouvrez un nouveau moyen de poser toutes vos questions quelque soit le
sujet !
Yahoo! Questions/Riponses pour partager vos connaissances, vos opinions et
vos expiriences.
http://fr.answers.yahoo.com


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


        

        
                
___________________________________________________________________________ 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]



--
Apache Maven - http://maven.apache.org/
Better Builds with Maven - http://library.mergere.com/

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

Reply via email to