I have a maven project with 13 sub modules. I have two questions how to optimize the build process:
- I want to compile the Java code only for x86-64 server. How I con configure Maven to do this?
- I have a server with 4 CPU cores. Is it possible to use multi-threading for compiling the code?
Java is cross platform. You can’t make it compile for only x86-64.
The
javacis 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.