Re: Multiple executions of Maven with a single run

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: Multiple executions of Maven with a single run

Romain Manni-Bucau
Hi Enrico

Technically concatenating all goals for all modules will do it but will be
quite long - guess it is why we do it in 2 times.

That said i always wondered why maven can read commands from a file/stdin
as any unix like soft so it would be something like:

mvn --commands-file ci.cmdlist

Using stdin/echo it would also match ypur ci need maybe?

Le dim. 5 janv. 2020 à 17:31, Enrico Olivelli <[hidden email]> a
écrit :

> Hello,
> Sometimes it happens that you have to launch twice Maven to:
> - build a whole reactor project (warmup)
> - run some specific mojo only a selection of modules
> mvn clean install -DskipTests -Dmaven.repo.local=tmprepo
> mvn do:something -pl module1,module1-Dmaven.repo.local=tmprepo
> I think that in the general case there is no way to do this with one single
> execution of Maven, for instance from CI.
> I am thinking about a simple enhancement to workaround this problem:
> We can let Maven executable to accept a list of command line execution
> arguments and loop executing the list, halting at the first failure