You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Libor Kramoliš <li...@gmail.com> on 2007/06/24 18:18:01 UTC
How to attach mojo to "pre-site"?
Hello.
I try to create mojo that is attached to pre-site phase but I am not
successful. What should I do to create such mojo?
What I have now. I have implementation (InitProjectMojo) of AbstractMojo
that is annotated by @goal init-project and @phase pre-site. And also it is
configured in client pom.xml:
<build>
<plugins>
<plugin>
<groupId>my.mojo</groupId>
<artifactId>maven-gdf4j-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>init-project</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
But when I execute mvn pre-site or mvn site my mojo is not executed. :-(
What did I miss? What should I also configure?
Thanks for your hints.
Libor
Re: How to attach mojo to "pre-site"?
Posted by Eric Redmond <er...@gmail.com>.
On 7/1/07, Libor Kramoliš <li...@gmail.com> wrote:
>
> As I mentioned I used @phase "pre-site" but it does not work.
My suggestion was to try it in "quotes" - but was a bad thought anyway,
forget it.
It looks like I should explicitly attach my mojo to "site" lifecycle. I
> guess the mojo belongs to "default" lifecycle. So question is HOW TO
> ATTACH
> MOJO to *SITE LIFECYCLE*!
Add it manually - like I showed you above
There is really nobody who tried to execute mojo in *pre-site* phase?!
Yes, all the time.
Thanks a lot,
> Libor
>
>
> On 7/1/07, Eric Redmond <er...@gmail.com> wrote:
> >
> > Try: @phase "pre-site"
> >
> > In any case, you can for binding to pre-site with
> >
> >
> > <executions>
> > <execution>
> > <phase>pre-site</phase>
> > <goals>
> > <goal>init-project</goal>
> > </goals>
> > </execution>
> > </executions>
> >
> > On 6/24/07, Libor Kramoliš <li...@gmail.com> wrote:
> > >
> > > Hello.
> > >
> > > I try to create mojo that is attached to pre-site phase but I am not
> > > successful. What should I do to create such mojo?
> > >
> > > What I have now. I have implementation (InitProjectMojo) of
> AbstractMojo
> > > that is annotated by @goal init-project and @phase pre-site. And also
> it
> > > is
> > > configured in client pom.xml:
> > >
> > > <build>
> > > <plugins>
> > > <plugin>
> > > <groupId>my.mojo</groupId>
> > > <artifactId>maven-gdf4j-plugin</artifactId>
> > > <executions>
> > > <execution>
> > > <goals>
> > > <goal>init-project</goal>
> > > </goals>
> > > </execution>
> > > </executions>
> > > </plugin>
> > > </plugins>
> > > </build>
> > >
> > > But when I execute mvn pre-site or mvn site my mojo is not executed.
> :-(
> > >
> > > What did I miss? What should I also configure?
> > >
> > > Thanks for your hints.
> > >
> > > Libor
> > >
> >
> >
> >
> > --
> > Eric Redmond
> > http://www.sonatype.com
> >
>
--
Eric Redmond
http://www.sonatype.com
Re: How to attach mojo to "pre-site"?
Posted by Libor Kramoliš <li...@gmail.com>.
As I mentioned I used @phase "pre-site" but it does not work.
It looks like I should explicitly attach my mojo to "site" lifecycle. I
guess the mojo belongs to "default" lifecycle. So question is HOW TO ATTACH
MOJO to *SITE LIFECYCLE*!
There is really nobody who tried to execute mojo in *pre-site* phase?!
Thanks a lot,
Libor
On 7/1/07, Eric Redmond <er...@gmail.com> wrote:
>
> Try: @phase "pre-site"
>
> In any case, you can for binding to pre-site with
>
>
> <executions>
> <execution>
> <phase>pre-site</phase>
> <goals>
> <goal>init-project</goal>
> </goals>
> </execution>
> </executions>
>
> On 6/24/07, Libor Kramoliš <li...@gmail.com> wrote:
> >
> > Hello.
> >
> > I try to create mojo that is attached to pre-site phase but I am not
> > successful. What should I do to create such mojo?
> >
> > What I have now. I have implementation (InitProjectMojo) of AbstractMojo
> > that is annotated by @goal init-project and @phase pre-site. And also it
> > is
> > configured in client pom.xml:
> >
> > <build>
> > <plugins>
> > <plugin>
> > <groupId>my.mojo</groupId>
> > <artifactId>maven-gdf4j-plugin</artifactId>
> > <executions>
> > <execution>
> > <goals>
> > <goal>init-project</goal>
> > </goals>
> > </execution>
> > </executions>
> > </plugin>
> > </plugins>
> > </build>
> >
> > But when I execute mvn pre-site or mvn site my mojo is not executed. :-(
> >
> > What did I miss? What should I also configure?
> >
> > Thanks for your hints.
> >
> > Libor
> >
>
>
>
> --
> Eric Redmond
> http://www.sonatype.com
>
Re: How to attach mojo to "pre-site"?
Posted by Eric Redmond <er...@gmail.com>.
Try: @phase "pre-site"
In any case, you can for binding to pre-site with
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>init-project</goal>
</goals>
</execution>
</executions>
On 6/24/07, Libor Kramoliš <li...@gmail.com> wrote:
>
> Hello.
>
> I try to create mojo that is attached to pre-site phase but I am not
> successful. What should I do to create such mojo?
>
> What I have now. I have implementation (InitProjectMojo) of AbstractMojo
> that is annotated by @goal init-project and @phase pre-site. And also it
> is
> configured in client pom.xml:
>
> <build>
> <plugins>
> <plugin>
> <groupId>my.mojo</groupId>
> <artifactId>maven-gdf4j-plugin</artifactId>
> <executions>
> <execution>
> <goals>
> <goal>init-project</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
>
> But when I execute mvn pre-site or mvn site my mojo is not executed. :-(
>
> What did I miss? What should I also configure?
>
> Thanks for your hints.
>
> Libor
>
--
Eric Redmond
http://www.sonatype.com
Re: How to attach mojo to "pre-site"?
Posted by Libor Kramoliš <li...@gmail.com>.
Unfortunately it does NOT work.
On 6/25/07, Arnaud Bailly <ab...@oqube.com> wrote:
>
> "Libor Kramoliš" <li...@gmail.com> writes:
>
> > Hello.
> >
> > I try to create mojo that is attached to pre-site phase but I am not
> > successful. What should I do to create such mojo?
> >
> > What I have now. I have implementation (InitProjectMojo) of AbstractMojo
> > that is annotated by @goal init-project and @phase pre-site. And also it
> is
> > configured in client pom.xml:
> >
> > <build>
> > <plugins>
> > <plugin>
> > <groupId>my.mojo</groupId>
> > <artifactId>maven-gdf4j-plugin</artifactId>
> > <executions>
> > <execution>
> > <goals>
> > <goal>init-project</goal>
> > </goals>
> > </execution>
> > </executions>
> > </plugin>
> > </plugins>
> > </build>
> >
> > But when I execute mvn pre-site or mvn site my mojo is not executed. :-(
> >
> > What did I miss? What should I also configure?
> >
> Hello,
> Not sure (didn't try it) but I think that you should attach your mojo
> configuration in
> the reporting section, not the build section.
>
> Regards,
>
> --
> OQube < software engineering \ génie logiciel >
> Arnaud Bailly, Dr.
> \web> http://www.oqube.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: How to attach mojo to "pre-site"?
Posted by Libor Kramoliš <li...@gmail.com>.
Unfortunately it does NOT work.
On 6/25/07, Arnaud Bailly <ab...@oqube.com> wrote:
>
> "Libor Kramoliš" <li...@gmail.com> writes:
>
> > Hello.
> >
> > I try to create mojo that is attached to pre-site phase but I am not
> > successful. What should I do to create such mojo?
> >
> > What I have now. I have implementation (InitProjectMojo) of AbstractMojo
> > that is annotated by @goal init-project and @phase pre-site. And also it
> is
> > configured in client pom.xml:
> >
> > <build>
> > <plugins>
> > <plugin>
> > <groupId>my.mojo</groupId>
> > <artifactId>maven-gdf4j-plugin</artifactId>
> > <executions>
> > <execution>
> > <goals>
> > <goal>init-project</goal>
> > </goals>
> > </execution>
> > </executions>
> > </plugin>
> > </plugins>
> > </build>
> >
> > But when I execute mvn pre-site or mvn site my mojo is not executed. :-(
> >
> > What did I miss? What should I also configure?
> >
> Hello,
> Not sure (didn't try it) but I think that you should attach your mojo
> configuration in
> the reporting section, not the build section.
>
> Regards,
>
> --
> OQube < software engineering \ génie logiciel >
> Arnaud Bailly, Dr.
> \web> http://www.oqube.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: How to attach mojo to "pre-site"?
Posted by Arnaud Bailly <ab...@oqube.com>.
"Libor Kramoli" <li...@gmail.com> writes:
> Hello.
>
> I try to create mojo that is attached to pre-site phase but I am not
> successful. What should I do to create such mojo?
>
> What I have now. I have implementation (InitProjectMojo) of AbstractMojo
> that is annotated by @goal init-project and @phase pre-site. And also it is
> configured in client pom.xml:
>
> <build>
> <plugins>
> <plugin>
> <groupId>my.mojo</groupId>
> <artifactId>maven-gdf4j-plugin</artifactId>
> <executions>
> <execution>
> <goals>
> <goal>init-project</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
>
> But when I execute mvn pre-site or mvn site my mojo is not executed. :-(
>
> What did I miss? What should I also configure?
>
Hello,
Not sure (didn't try it) but I think that you should attach your mojo configuration in
the reporting section, not the build section.
Regards,
--
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org