> -----Original Message-----
> From: Vincent Massol [mailto:[EMAIL PROTECTED]
> Sent: dimanche 17 avril 2005 16:45
> To: 'Maven Developers List'
> Subject: RE: [M2] clover
[snip]
> Also, there's something I'm not sure I understand. Where do you tell m2
> that
> such plugin is to be called when a lifecycle goal is invoked. For example,
> invoking "m2 install" will invoke the maven-install-plugin because I guess
> it's bound by default. What if I wanted to write another installer plugin
> and let it be called instead of the default maven-install-plugin. How
> would
> I do that?
>
> Also, what if I wanted to have a plugin that is triggered just before (or
> after) the maven-install-plugin. I guess I would bind it to the install
> phase but how do I tell maven to execute it when "m2 install" is called?
I've just discovered the <goals> element of the POM. So I guess the answer
would be:
1/ the said plugin would first need to be bound to the right phase. For
example let's imagine there is a clover:instrument goal bound to the
generate-sources phase and a clover:compile goal bound to the compile phase.
2/ then in your pom.xml you would specify:
<build>
<plugins>
<plugin>
<artifactId>maven-clover-plugin</artifactId>
<goals>
<goal>
<id>clover:instrument</id>
</goal>
<goal>
<id>clover:compile</id>
</goal>
</goals>
</plugin>
</plugins>
</build>
3/ Whenever the user would type something like "m2 compile" it would execute
the 2 goals.
Is that correct?
Question: how is the order defined between compiler:compile and
clover:compile in this case?
[snip]
Of course this still does not answer all the points from my earlier email
because this would still allow only one fixed build lifecycle.
-Vincent
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]