java - Maven multi-module project - how to run an operation after all submodules have finished -


i have multi module maven project , i'd able run operation (antrun) after submodules have finished execution.

in projects build rpms each sub-module , in deploy phase copy rpms (by ssh) rpm repository.
rpm repo requires me run createdb command after adding new rpms can index them.
have antrun runs scp , copies rpms repo. runs each submodule produces rpm , hooked maven deploy phase. can after each scp run createrepo command that'd wasteful, have more 10 submodules , each createrepo takes minute i'll wasting precious build time.

what i'd after submodules have finished, run createrepo. once.

my first attempt hook antrun calls createrepo command parent pom's (the super-pom) deploy phase. did , problem parent's deploy phase runs before submodules' deploy phase. wanted run after
can't attach createrepo antrun other later phase since deploy phase last in lifecycle.

so question is: there way run "cleanup" antrun or plugin in general that'll executed once, after build operations of submodules have ended successfully?

a hack around create yet submodule , make sure it's last making dependent on other modules , run createrepo module's deploy phase. that's ugly , hard maintain. prefer cleaner solution.

thanks

maven version 2.2.1

i'm not sure final suggestion of creating dedicated module dependent on others ugly. after all, leveraging maven's dependency management. can name in obvious manner make clear maintainers going on , fit in nicely overall build process of project.

why not put in place , see how works you? remember working code beats beautiful non-working code every time.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -