You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Eric Redmond <er...@gmail.com> on 2007/07/01 02:55:59 UTC

Re: How to attach mojo to "pre-site"?

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>.
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
>