Java – how to compile Maven projects efficiently and quickly

I have a maven project with 13 sub modules I have two questions about how to optimize the build process:

>I want to compile java code only for x86 - 64 servers How do I configure Maven? > I have a server with four CPU cores Can I use multithreading to compile code?

Solution

Java is cross platform You cannot compile just for x86 - 64

Javac is multithreaded It may not use all the cores you have, but this is multithreading you can make

As Andrew said, you can make the build multithreaded and make the tests run at the same time (which may break your tests), which won't make the compilation concurrent

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>