当前位置: 首页 > 知识库问答 >
问题:

Maven 3.8.1不支持wrapperVersion,它必须至少为4

越飞翮
2023-03-14
mvn wrapper:wrapper                                                                                                                      ⇣82.8 KiB/s ⇡2.76 KiB/s 192.168.2.110   77.29.199.151   100%  ─╯
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------------------< com.angel:demo >---------------------------
[INFO] Building demo 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-wrapper-plugin:3.0.2:wrapper (default-cli) @ demo ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.897 s
[INFO] Finished at: 2021-05-27T16:14:23+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-wrapper-plugin:3.0.2:wrapper (default-cli) on project demo: wrapperVersion not supported for Maven 3.8.1, it must be at least 4. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Maven版本:

Apache Maven 3.8.1(Non-Canonical_2021-04-26T21:52:54z_root)Maven Home://opt/Maven Java版本:11.0.11,供应商:Oracle Corporation,运行时:/usr/lib/jvm/java-11-OpenJDK默认区域设置:en_US,平台编码:UTF-8操作系统名称:“Linux”,版本:“5.12.4-arch1-2”,arch:“AMD64”,家族:“UNIX”

OS版本:Arch Linux Maven应该包含从Maven3.7开始的包装器脚本,这应该不是问题,因为我使用的是Maven3.8,但是版本4的错误消息让我感到困惑,我不知道在哪里寻找答案。

共有1个答案

堵茂勋
2023-03-14

有时答案就在眼前,但疲倦的眼睛会让我们失明:D

正如@jfabianmeier所说,没有Maven3.7,从Maven4.0开始就包含了Maven包装器脚本

https://maven.apache.org/plugins/maven-wrapper-plugin/

 类似资料: