CentOS上Maven Java编译性能优化
一 构建层面优化
二 JVM与Maven配置
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<fork>true</fork>
<parallel>true</parallel>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
三 依赖与代码组织
四 CentOS系统层面优化
五 常用命令与参数示例
mvn -T 1C -pl module-a,module-b -am compile -Dmaven.test.skip=true --no-transfer-progress
mvn -pl module-web -am package
mvn -T 1C clean package -U
mvnd clean package -T 1C
mvn --batch-mode -T 1C --no-transfer-progress \
--projects ad-show-performance-service --also-make \
clean package -U -Dmaven.test.skip=true -Djacoco.skip=true
<mirrors>
<mirror>
<id>nexus-internal</id>
<url>https://nexus.example.com/repository/maven-public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>