You could have your plugin define a custom packaging and then bind the
plugin goals to phases for that custom packaging's lifecycle.

Otherwise I think you're low on luck

On Tue, Sep 16, 2008 at 10:15 AM, Nick Stolwijk <[EMAIL PROTECTED]>wrote:

> As far as I know you have to specify the goals in your projects, which
> uses your plugin. If you have the right @phase annotations it should
> be enough to add only the executions like so:
>
> <executions>
>  <execution>
>     <goals>
>         <goal>one</goal>
>         <goal>two</goal>
>         <goal>three</goal>
>     </goals>
>   </execution>
> </executions>
>
> As far as I know it is not possible to automatically add the goals to
> the life cycle without specifying its execution.
>
> Hth,
>
> Nick Stolwijk
> ~Java Developer~
>
> Iprofs BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> www.iprofs.nl
>
>
>
> On Tue, Sep 16, 2008 at 11:03 AM, Nick Pellow <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> >
> > I have 3 MOJOs in a single maven plugin. Each MOJO needs to be executed
> > during specific build phases.
> > What is the best way to make this possible, without forcing users of the
> > plugin to insert explicit executions into their pom.xml ?
> >
> > i.e. is it possible to make the following configuration by doing it
> > programitcally in the plugin itself?
> > <executions>
> >                    <execution>
> >                        <id>1</id>
> >                        <phase>process-sources</phase>
> >                        <goals>
> >                            <goal>first</goal>
> >                        </goals>
> >                    </execution>
> >                    <execution>
> >                        <id>2</id>
> >                        <phase>process-test-classes</phase>
> >                        <goals>
> >                            <goal>second</goal>
> >                        </goals>
> >                    </execution>
> >                    <execution>
> >                        <id>3</id>
> >                        <phase>test</phase>
> >                        <goals>
> >                            <goal>third</goal>
> >                        </goals>
> >                    </execution>
> > </executions>
> >
> > this will result in: process-sources plugin:first process-test-classes
> > plugin:second test plugin:third
> > being run whenever the test phase is called.
> >
> > I have used the @phase <phaseName> annotation in each MOJO. These seem to
> > get ignored however if the goal is not called directly?
> >
> > Please let me know if you require further information regarding this.
> >
> > Cheers,
> > Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to