You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by kovalen pechaycaren <ko...@gmail.com> on 2006/10/26 13:28:00 UTC
maven plugin execution phase: post-site?
Hi,
I am writing a maven plugin to be run on other projects. It needed to be
executed after the site phase. For a multi-project (one parent and several
modules), how to I configure the plugin to be run after reports have been
generated for all modules?
The problem is that the plugin is being run DURING the site phase (which
results in a number of invocation when only one for a project was
expected) when i include the following in the parent pom:
<plugin>
<groupId>com.accenture.collab.maven.plugin</groupId>
<artifactId>collab-quality</artifactId>
<version>0.1-SNAPSHOT</version>
<executions>
<execution>
<phase>site</phase>
<goals>
<goal>quality</goal>
</goals>
</execution>
</executions>
</plugin>
I have also included the following in my plugin's mojo, but no success:
* @execute phase="post-site"
Anyone can help?
Thanks
--
Kovalen
Re: maven plugin execution phase: post-site?
Posted by kovalen pechaycaren <ko...@gmail.com>.
Thanks, this part is helpfull...
On 10/26/06, pjungwir <ma...@9stmaryrd.com> wrote:
>
>
> Hello,
>
> @execute means that when the mojo is run, it should spawn a separate
> lifecycle and run everything up to the given phase before running itself.
> It's useful for running a mojo from the command line like "mvn
> plugin:mojo,"
> but it's problematic when you want to bind the mojo to a phase.
>
> In your pom, you're binding your plugin to the site phase. So when maven
> gets there, it processes your mojo. It sees the mojo's @execute tag, so it
> spawns a separate lifecycle, runs everything from the beginning up to
> post-site, then runs your mojo.
>
> So first remove the @execute tag. Then either change the pom so you're
> binding the mojo to the post-site phase, or use the @phase tag to set a
> default phase of post-site, and don't give any <phase> in your pom.
>
> Paul
>
>
>
> kovalen pechaycaren wrote:
> >
> > Hi,
> > I am writing a maven plugin to be run on other projects. It needed to
> be
> > executed after the site phase. For a multi-project (one parent and
> > several
> > modules), how to I configure the plugin to be run after reports have
> been
> > generated for all modules?
> >
> > The problem is that the plugin is being run DURING the site phase (which
> > results in a number of invocation when only one for a project was
> > expected) when i include the following in the parent pom:
> >
> > <plugin>
> > <groupId>com.accenture.collab.maven.plugin</groupId>
> > <artifactId>collab-quality</artifactId>
> > <version>0.1-SNAPSHOT</version>
> > <executions>
> > <execution>
> > <phase>site</phase>
> > <goals>
> > <goal>quality</goal>
> > </goals>
> > </execution>
> > </executions>
> > </plugin>
> > I have also included the following in my plugin's mojo, but no success:
> > * @execute phase="post-site"
> >
> > Anyone can help?
> >
> > Thanks
> > --
> > Kovalen
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/maven-plugin-execution-phase%3A-post-site--tf2513362.html#a7014966
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Kovalen
Re: maven plugin execution phase: post-site?
Posted by pjungwir <ma...@9stmaryrd.com>.
Hello,
@execute means that when the mojo is run, it should spawn a separate
lifecycle and run everything up to the given phase before running itself.
It's useful for running a mojo from the command line like "mvn plugin:mojo,"
but it's problematic when you want to bind the mojo to a phase.
In your pom, you're binding your plugin to the site phase. So when maven
gets there, it processes your mojo. It sees the mojo's @execute tag, so it
spawns a separate lifecycle, runs everything from the beginning up to
post-site, then runs your mojo.
So first remove the @execute tag. Then either change the pom so you're
binding the mojo to the post-site phase, or use the @phase tag to set a
default phase of post-site, and don't give any <phase> in your pom.
Paul
kovalen pechaycaren wrote:
>
> Hi,
> I am writing a maven plugin to be run on other projects. It needed to be
> executed after the site phase. For a multi-project (one parent and
> several
> modules), how to I configure the plugin to be run after reports have been
> generated for all modules?
>
> The problem is that the plugin is being run DURING the site phase (which
> results in a number of invocation when only one for a project was
> expected) when i include the following in the parent pom:
>
> <plugin>
> <groupId>com.accenture.collab.maven.plugin</groupId>
> <artifactId>collab-quality</artifactId>
> <version>0.1-SNAPSHOT</version>
> <executions>
> <execution>
> <phase>site</phase>
> <goals>
> <goal>quality</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> I have also included the following in my plugin's mojo, but no success:
> * @execute phase="post-site"
>
> Anyone can help?
>
> Thanks
> --
> Kovalen
>
>
--
View this message in context: http://www.nabble.com/maven-plugin-execution-phase%3A-post-site--tf2513362.html#a7014966
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org