gpt4 book ai didi

java - "The command line is too long"——运行maven测试时

转载 作者:搜寻专家 更新时间:2023-11-01 02:09:03 26 4
gpt4 key购买 nike

在 64 位 Windows 上运行 $mvn test 会出现以下错误,即使我执行 $mvn test -Dgwt.genParam=false:

The command line is too long

最佳答案

确保您使用的是 2.16 版本并且您有 useManifestOnlyJar 选项(此处为 documented)。

例如:

<project>
[...]
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>

<configuration>
<useManifestOnlyJar>true</useManifestOnlyJar>
</configuration>

</plugin>
</plugins>
</pluginManagement>
</build>
[...]
</project>

这将创建带有重新创建类路径的 list 的 jar(与通过 CLASSPATH 变量设置它相反,这是一种受 Windows 命令行限制问题影响的方法)。

关于java - "The command line is too long"——运行maven测试时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22528099/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com