Maven: Queue Commands possible?

Hello,

I’m currently trying to make my own Widget but whenever i want to test it i have to execute 6 commands in a row (like vaadin:compile then package, …) to first compile the widget and then the Test-Project. All of them are currently in seperate Debug Configurations.

Now my question is: Is there a way to “queue” these Maven commands/Debug Configurations so that i only have to start them once and all of them get executed one after the other?

I’m using Eclipse Juno with m2eclipse.

Cheers,
M R

Just separate the goals with spaces in the run configuration as long as they are for the same project - it works the same way as the command line interface for Maven.

For different projects, they would need to be under a “master” (reactor) project and you would need to make sure none of the goals makes any of the sub-project builds fail, which sometimes requires some tricky configuration or binding some goals to build phases in sub-project POMs.

Thank you Henri.

I have two project (Widget Project and a Demo Project) with each having 3 goals. Now i managed to bundle these 6 launch configurations into only 2. So that’s already much easier.

Now i already have a Master/Root Project which is a parent folder of both other projects (project structure made by the vaadin widget archetype). So i will eventually try merging those 2 config. into 1.

Again thank you for your quick reply.

Cheers,
M R

Additional question:
I’m currently trying the Reactor-Project approach and i wonder if there is a way to create a launch configuration for the reactor with 6 commands where the first few target one module and the other ones target the other module.
My UseCase: I would like to make a configuration and i want to do these things in a row:

  • compile the widget
  • package the widget to a jar
  • install the jar in the local repository
  • update the dependcies/widgetset of the demo
  • recompile the widgetset of the demo
  • package and run the demo

Currently like i said i have those seperated in 2 launch config.
I already looked through some related maven wiki threads/forum posts/… and found things like -f to target a specific pom and -r to only target specific projects. Now is there a way to use these things in one command so that i can switch the project mid-way through the execution? Or is there a better way to do this?

Cheers,
M R