maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aliaksei Lahachou <aliaksei.lahac...@gmail.com>
Subject Re: Executing a goal *after* install
Date Wed, 25 Jul 2012 07:47:10 GMT
Hi Mirko!

You may try doing the same trick as the cobertura-maven-plugin does when
aggregate is set to true.

1. Every module executes the plugin, but the plugin updates the same file
in the directory of the project from which the build was started. In you
case you may, for example, calculate SHA1 of the module artifacts and
append them to a file.
2. When the execution belongs to the last module in the reactor,
cobertura-maven-plugin generates a report in the directory of the project
from which the build was started. At this point you have all artifacts, the
list of SHA1, and you may do other stuff with it, for example, post the
list somewhere.


Regards,
htfv (Aliaksei Lahachou)


On Wed, Jul 25, 2012 at 9:24 AM, Mirko Friedenhagen <mfriedenhagen@gmail.com
> 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 <brett@apache.org> 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: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >
> > --
> > Brett Porter
> > brett@apache.org
> > http://brettporter.wordpress.com/
> > http://au.linkedin.com/in/brettporter
> > http://twitter.com/brettporter
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message