I have a maven project with 13 sub modules. I have two questions how to optimize the build process:
2) mvn package -T 2C
will build with 2 Threads per CPU core
- I want to compile the Java code only for x86-64 server. How I con configure Maven to do this?
Java is cross platform. You can't make it compile for only x86-64.
.2. I have a server with 4 CPU cores. Is it possible to use multi-threading for compiling the code?
The javac
is multi-threaded. It might not use all the cores you have, but that's as multi-threaded as you can make it.
As Andrew notes, you can make the build multi-threaded which causes the tests to be run concurrently (something which might break your tests) This doesn't make the compilation concurrent.
javac
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With