更快的maven?mvnd!!!

/ 后端 / 没有评论 / 548浏览

mvnd安装

跟着文档安装... https://github.com/apache/maven-mvnd

 mvnd --version
mvnd native client 0.7.1-windows-amd64 (97c587c11383a67b5bd0ff8388bd94c694b91c1e)
Terminal: org.jline.terminal.impl.jansi.win.JansiWinSysTerminal
Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
Maven home: C:\soft\mvnd-0.7.1-windows-amd64\mvn
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: C:\soft\java\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

配置

我就改了最后一行,直接可以使用原来maven的配置

# The location of the maven settings file. The client normally uses default settings in {@code ~/.m2/settings.xml}.
maven.settings=C:/java/repository/settings-wf.xml

#测试 mvn:

$ mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< net.wfkids:wfcm-api >-------------------------
[INFO] Building wfcm-api 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ wfcm-api ---
[INFO] Deleting C:\wf\wfcm\target
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ wfcm-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 131 resources
[INFO] Copying 61 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ wfcm-api ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 901 source files to C:\wf\wfcm\target\classes
[INFO] /C:/wf/wfcm/src/main/java/com/wfcm/entity/WfjxWxImageEntity.java: 某些输入文件使用或覆盖了已过时的 API。
[INFO] /C:/wf/wfcm/src/main/java/com/wfcm/entity/WfjxWxImageEntity.java: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
[INFO] /C:/wf/wfcm/src/main/java/com/wfcm/service/applet/WechatAppletPunchClockService.java: 某些输入文件使用了未经检查或不安全的操作。
[INFO] /C:/wf/wfcm/src/main/java/com/wfcm/service/applet/WechatAppletPunchClockService.java: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ wfcm-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory C:\wf\wfcm\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ wfcm-api ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ wfcm-api ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:3.3.1:war (default-war) @ wfcm-api ---
[INFO] Packaging webapp
[INFO] Assembling webapp [wfcm-api] in [C:\wf\wfcm\target\wfcm-api]
[INFO] Processing war project
[INFO] Building war: C:\wf\wfcm\target\wfcm-api.war
[INFO] 
[INFO] --- spring-boot-maven-plugin:2.4.3:repackage (repackage) @ wfcm-api ---
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  42.919 s
[INFO] Finished at: 2021-12-30T10:46:37+08:00

mvnd:

$ mvnd clean package -Dquickly
[INFO] Processing build on daemon a4b180a0
[INFO] Scanning for projects...
[INFO] BuildTimeEventSpy is registered.
[INFO]
[INFO] Using the SmartBuilder implementation with a thread count of 11
[INFO] Task segments : [clean, package]
[INFO] Build maximum degree of concurrency is 11
[INFO] Total number of projects is 1
[INFO]
[INFO] ------------------------< net.wfkids:wfcm-api >-------------------------
[INFO] Building wfcm-api 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ wfcm-api ---
[INFO] Copying 131 resources
[INFO] Copying 61 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ wfcm-api ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 901 source files to C:\wf\wfcm\target\classes
[INFO] /C:/wf/wfcm/src/main/java/com/wfcm/entity/WfjxWxImageEntity.java: 某些输入文件使用或覆盖了已过时的 API。
[INFO] /C:/wf/wfcm/src/main/java/com/wfcm/entity/WfjxWxImageEntity.java: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
[INFO] /C:/wf/wfcm/src/main/java/com/wfcm/service/applet/WechatAppletPunchClockService.java: 某些输入文件使用了未经检查或不安全的操作。
[INFO] /C:/wf/wfcm/src/main/java/com/wfcm/service/applet/WechatAppletPunchClockService.java: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ wfcm-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory C:\wf\wfcm\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ wfcm-api ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ wfcm-api ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:3.3.1:war (default-war) @ wfcm-api ---
[INFO] Packaging webapp
[INFO] Assembling webapp [wfcm-api] in [C:\wf\wfcm\target\wfcm-api]
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  38.021 s (Wall Clock)
[INFO] Finished at: 2021-12-30T10:47:37+08:00

额.好像是快了点...但是有时候又不快....