add a second goal the first goal will store some thread completion object in MavenSession or in a Class level static field
When all threads are finished the completion object will be updated by the last thread The second goal blocks until the completion object is completed. Then add the second goal execution to your project at the appropriate phase where you need the execution to have completed... for example if you start the threads in the process-sources phase, you might be happy to let them run in the background until the test phase has completed, but they must be finished by the time the package phase runs, so I would bind your execution of the second goal to the test phase -Stephen 2009/10/28 Gajo Csaba <csaba.g...@cosylab.com> > Hello all, > > Could someone please answer my question? I don't believe it's that > complicated... > > Thanks, Csaba > > > > Hello, > > I've developed a plug-in which executes some shell commands. I would like > to run these commands in parallel with the rest of the build process, > because they don't affect the other files. So I was thinking of creating a > thread in the execute() method, starting it, and let it do its job. The > problem is this works for some time, and Maven keeps on doing its job, but > if Maven's lifecycle ends before the thread has finished its job, then the > thread will be terminated as well. > > Is there a way to instruct Maven to not terminate until the thread has > finished, or at least to not terminate the thread itself? > > Thanks, Csaba > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org >