While trying to implement what's below, I've found a snag.

Here's a typical pom using clover for checking code coverage:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clover-plugin</artifactId>
        <configuration>
          <targetPercentage>1%</targetPercentage>
        </configuration>
        <executions>
          <execution>
            <id>main</id>
            <phase>verify</phase>
            <goals>
              <goal>instrument</goal>
              <goal>check</goal>
            </goals>
          </execution>
[...]

* I've modified the clover:instrument mojo to fork a lifecycle till the
install phase (it was forking till test previously) in order to install the
generated clovered artifact to the local repo. 

* However, as the verify phase is happening before the install phase this is
now triggering the clover:check goal *inside* the forked lifecycle and it's
executed as second time in the main lifecycle. I need to prevent
clover:check from executing inside the forked lifecyce.

Question: is there a way not to execute clover:check inside the forked
lifecycle? I can't find a solution out of this apart from binding
clover:check to a later phase but then the only phase after install is
deploy which doesn't really make sense...

Thanks
-Vincent

> -----Original Message-----
> From: Vincent Massol [mailto:[EMAIL PROTECTED]
> Sent: mercredi 5 avril 2006 12:58
> To: 'Maven Developers List'
> Subject: Feedback needed on clover aggregation feature I'd like to
> implement...
> 
> Hi,
> 
> I've just realized that there's work to be done on the clover plugin if we
> want it to support aggregated clover reports. By aggregated reports, I
> mean
> getting a single report for all modules. Right now this is possible but
> each
> module will only contribute coverage for its own code. I'd like that
> coverage generated by a module on some other module's code also gets
> counted.
> 
> For this I'm planning to try implementing the following:
> 
> * Modify clover:instrument so that the forked lifecycle extends till the
> install phase
> 
> * Create an internal clover mojo bound to the install phase that will
> created a clovered version of the project's artifact as an attached
> artifact
> (classifier = "clover").
> 
> * Handle the different type of packaging. For example for a WAR packaging,
> add the clover jar to the attached clovered WAR, etc.
> 
> * Modify the clover:instrumentInternal so that for any dependency
> artifact,
> it looks for the clovered version in the repo and adds it instead of the
> non-clovered version.
> 
> As this is pretty involved I'd like to be sure this is the right thing to
> do.
> 
> Thanks for any feedback!
> -Vincdent
> 
> 
> 
> 
> 
> 
> __________________________________________________________________________
> _
> Nouveau : tiliphonez moins cher avec Yahoo! Messenger ! Dicouvez les
> tarifs exceptionnels pour appeler la France et l'international.
> Tilichargez sur http://fr.messenger.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


        

        
                
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

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

Reply via email to