Wouldn't you find a similar thing in the release plugin? It appears to define 
it's own.

-Chris

Sent from my iPhone

On 26/02/2012, at 6:41 AM, Benson Margulies <bimargul...@gmail.com> wrote:

> What if you wanted to define a mojo to execute a custom lifecycle that
> included arbitrary goals of arbitrary other plugins?
> 
> The doc that's out there won't tell you how, but it turns out to be possible.
> 
> @execute demands that the lifecycle= point to a lifecycle from the
> local lifecycle.xml. Lifecycle.xml can only mention goals of the
> current plugin. You might think that the lifecycle mapping mechanism
> could then be used to add decorations. AFAIKT, not. I ended up with
> the following: a stub definition in lifecycle.xml, and then both a
> full lifecycle definition and a mapping definition in components.xml.
> I suspect the following has some redundancy (and also some redundancy)
> but I leave it to any experts reading this to point it out.
> 
> Maven.apache.org has essentially no doc on any of this; there's some
> in the sonatype.org book, but it doesn't get this far.
> 
> Lifecycle.xml:
> 
> <lifecycles>
> <lifecycle>
>  <id>svnpubsub</id>
>  <phases>
>   <phase>
>    <id>svnpubsub-prepare</id>
>   </phase>
>   <phase>
>    <id>svnpubsub-pre-site</id>
>   </phase>
>   <phase>
>    <id>svnpubsub-site</id>
>   </phase>
>   <phase>
>    <id>svnpubsub-post-site</id>
>   </phase>
>   <phase>
>    <id>svnpubsub-publish</id>
>   </phase>
>  </phases>
> </lifecycle>
> 
> </lifecycles>
> 
> components.xml:
> 
> 
> <component-set>
> <components>
>  <component>
>   <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
>   <role-hint>svnpubsub</role-hint>
>   <implementation>
>    org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
>   </implementation>
>   <configuration>
>    <phases>
>        <svnpubsub-prepare>
>      org.apache.maven.plugins:asf-svnpubsub-plugin:1.0-SNAPSHOT:prepare
>     </svnpubsub-prepare>
>     <svnpubsub-site>
>      org.apache.maven.plugins:maven-site-plugin:3.0:site
>     </svnpubsub-site>
>     <svnpubsub-post-site>
>      org.apache.maven.plugins:maven-site-plugin:3.0:stage
>     </svnpubsub-post-site>
>     <svnpubsub-publish>
>      org.apache.maven.plugins:asf-svnpubsub-plugin:1.0-SNAPSHOT:prepare
>     </svnpubsub-publish>
>   </phases>
>   </configuration>
>  </component>
>  <component>
>   <role>org.apache.maven.lifecycle.Lifecycle</role>
>   <implementation>org.apache.maven.lifecycle.Lifecycle</implementation>
>   <role-hint>svnpubsub</role-hint>
>   <configuration>
>    <id>svnpubsub</id>
>    <phases>
>     <phase>svnpubsub-prepare</phase>
>     <phase>svnpubsub-site</phase>
>     <phase>svnpubsub-post-site</phase>
>     <phase>svnpubsub-publish</phase>
>    </phases>
>    <default-phases>
>     <svnpubsub-prepare>
>      org.apache.maven.plugins:asf-svnpubsub-plugin:1.0-SNAPSHOT:prepare
>     </svnpubsub-prepare>
>     <svnpubsub-site>
>      org.apache.maven.plugins:maven-site-plugin:3.0:site
>     </svnpubsub-site>
>     <svnpubsub-post-site>
>      org.apache.maven.plugins:maven-site-plugin:3.0:stage
>     </svnpubsub-post-site>
>     <svnpubsub-publish>
>      org.apache.maven.plugins:asf-svnpubsub-plugin:1.0-SNAPSHOT:prepare
>     </svnpubsub-publish>
>    </default-phases>
>   </configuration>
>  </component>
> </components>
> </component-set>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to