mvnd ignores -b (--builder) and -T (--threads) parameter
Affected version
1.0.3
Bug description
Maven Daemon prefers Takari smart builder by default.
The problem is that it ignores explicitly configured builder on the command line or in the .mvn/maven.config.
E.g. it's not possible to use https://github.com/maven-turbo-reactor/maven-turbo-builder adding it to .mvn/extensions.xml in combination with neither CLI -b turbo nor .mvn/maven.config -bturbo.
According to mvnd -h | grep builder there are two ways for it:
-b,--builder <arg> The id of the build strategy to use
-Dmvnd.builder=<string>;-b,--builder <string> The builder implementation the daemon should use.
takari-smart-builder extension, remain buildable with mvnd (where use of this extension would cause issues). Value is expected as comma separated pairs.
Default: io.takari.maven:takari-smart-builder
The second -Dmvnd.builder=turbo works fine.
Same problem with -T (--threads) which is always defined as default -T1C (-Dmvnd.threads=6 works fine). But the mvnd -h claims both should be supported
@gnodet Yes, as mvnd was directly relying on takari-smart-builder. Unsure is it doable for mvnd 1.x (mvn 3.9.x), but we should "open it up" in mvnd 2.x (mvn 4.x), where things are way simpler...
I haven't tried -b yet, but I use -T7 all the time and it works just fine. Also note that the default is not -T1C, but instead, mvnd keeps one of the cores free (e.g. on a 14-core machine it defaults to 13 threads).
(Tested with mvnd 1.0.3, OpenJDK 21.0.9 (Temurin), macOS 15.7.2)