Mirko, so, you want to have your mojo run at last reactor module being built (having your mojo defined)?
Then take a peek at this: https://github.com/sonatype/nexus-maven-plugins/tree/master/nexus-staging-maven-plugin and (as it uses) this: https://github.com/sonatype/mojo-commons/blob/master/src/main/java/org/sonatype/maven/mojo/execution/MojoExecution.java The "deploy" mojo does exactly the same: it does something (in your case would do nothing), and "kicks" in in very last reactor module. Or, the "build action"(s), those literally skips themselves until invoked by Maven on last module in reactor build: https://github.com/sonatype/nexus-maven-plugins/blob/master/nexus-staging-maven-plugin/src/main/java/org/sonatype/nexus/maven/staging/workflow/AbstractStagingBuildActionMojo.java#L131 Hope helps, ~t~ On Wed, Jul 25, 2012 at 9:24 AM, Mirko Friedenhagen <[email protected] > wrote: > Hello Brett, > > unfortunately, binding it to Lifecycle.INSTALL without a custom > lifecycle seems not to be good enough. During the run of "mvn > install", "install" will be run in every module seperately (first > parent, the reactor projects). Now after install:install succeeded in > the parent, my goal foo:create-sha1-list runs but install:install did > not run in the other reactor projects (probably they are even not yet > compiled yet). > > I want to create exactly *one* bill-of-materials for *all* artifacts > created in the multi-module project. > > I will take a look at the lifecycle stuff, though I fear I did not > grasp the documentation right now :-). > > Regards Mirko > > On Wed, Jul 25, 2012 at 2:13 AM, Brett Porter <[email protected]> wrote: > > Binding the mojo in the install phase will run it after anything already > executed in the install phase, which should be sufficient for your use case > (you can probably even run it in the package phase since everything > attaching artifacts will happen there). > > > > - Brett > > > > On 25/07/2012, at 7:08 AM, Mirko Friedenhagen wrote: > > > >> Hello, > >> > >> in a multi-module project, I want to create a sha1 list of all > >> artifacts created. For that I created a Mojo which collects all > >> artifacts as well as attachedArtifacts from the executionRoot as well > >> as the invoking parent. Now I probably need a way to execute a plugin > >> *after* install ran in all projects. Is there a way to define that I > >> want to run the mojo "post-install"? > >> > >> Regards Mirko > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [email protected] > >> For additional commands, e-mail: [email protected] > >> > > > > -- > > Brett Porter > > [email protected] > > http://brettporter.wordpress.com/ > > http://au.linkedin.com/in/brettporter > > http://twitter.com/brettporter > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
