dfsg76
dfsg76

Reputation: 524

How to run maven build multithreaded all the time by default

I want to spare the time typing a -T3 on the command line as I want all the maven builds I will ever do to run multithreaded.

Maven 3.3.9 I googled but didn't find anything promising, only the suggestion to add an environment variable for command line opts and append that to every maven call on commandline.

Maven: configure parallel build in pom.xml

This way, every time, still a manual step is required (entering the environment variable's name) to do a parallel build.

I'd like to configure that globally in the mvn settings.xml file.

Upvotes: 4

Views: 1719

Answers (1)

khmarbaise
khmarbaise

Reputation: 97467

You can't configure thing like this settings.xml. This can be configured differently since Maven 3.3.1.

You can use a file ${maven.projectBasedir}/.mvn/maven.config which contains the options given on command like within the root directory of your project which simply can contain:

-T 3

but this is limited on a project base not always.

Upvotes: 5

Related Questions