> -----Original Message-----
> From: Brett Porter [mailto:[EMAIL PROTECTED]
> Sent: mercredi 26 octobre 2005 07:46
> To: Maven Developers List
> Subject: Re: [m2] Clover plugin issue with latest install plugin
> 
> It is supposed to clone the lifecycle, and the clover plugin used to
> work. Bug?

Looks like a bug to me but I haven't tracked it down. Actually I don't even
know if I have enough core knowledge to track it... Help would be welcome
here. That's the only little detail that remains before being able to
release the Clover plugin! (the doc is still not finished but I can do that
very quickly).

Thanks
-Vincent
 
> Vincent Massol wrote:
> > Hi there,
> >
> > The Clover plugin forks a custom lifecycle when executing either the
> > clover:check or clover:clover mojo. Let's take the clover:check mojo as
> an
> > example:
> >
> > @phase verify
> > @execute phase="test" lifecycle="clover"
> >
> > Thus, if the user calls "mvn install" on a project where the
> clover:check
> > mojo is defined in the pom.xml my understanding is:
> >
> > - the main lifeycle is going to be triggered
> > - once it reaches the verify phase it's going to start the clover
> lifecycle
> > - the clover lifecycle is going to run all the phases again till the
> test
> > phase
> > - after the clover lifecycle finishes the main lifecycle continues
> >
> > Is that correct?
> >
> > The problem I have is that I get the following error:
> >
> > [INFO] [install:install]
> > [INFO] Installing
> > C:\dev\maven\components\trunk\examples\maven-clover-plugin-
> samples\maven-clo
> > ver-plugin-sample-simple\target\clover\classes to C:\Documents and
> > Settings\Vincent
> > Massol\.m2\repository\org\apache\maven\plugins\maven-clover-plugin-
> sample-si
> > mple\1.0-SNAPSHOT\maven-clover-plugin-sample-simple-1.0-SNAPSHOT.jar
> >
> > As you can see the install plugin is not pointing to the correct
> artifact.
> > It's pointing to the target/clover/classes directory instead of pointing
> to
> > target/maven-clover-plugin-sample-simple-1.0-SNAPSHOT.jar
> >
> > I believe this is because the clover plugin modifies some Project
> settings.
> > However I would have thought that the spawned lifecycle would also clone
> the
> > Project so that when it returns the original Project is left untouched.
> >
> > For information, here's what is modified in the clover mojo:
> >
> > this.project.getCompileSourceRoots().remove( 0 );
> > this.project.addCompileSourceRoot( this.cloverOutputSourceDirectory );
> >
> > this.project.setDependencyArtifacts( ... );
> >
> > // Explicitely set the output directory to be the Clover one so that all
> > // other plugins executing thereafter output files in the Clover output
> > // directory and not in the main output directory.
> > // TODO: Ulgy hack below. Changing the directory should be enough for
> > // changing the values of all other properties depending on it!
> > this.project.getBuild().setDirectory( this.cloverOutputDirectory );
> > this.project.getBuild().setOutputDirectory(
> >     new File( this.cloverOutputDirectory, "classes" ).getPath() );
> > this.project.getBuild().setTestOutputDirectory(
> >     new File( this.cloverOutputDirectory, "test-classes" ).getPath() );
> >
> > Any idea?
> >
> > Thanks
> > -Vincent
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



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

Reply via email to