为了禁用我的 Maven 项目的 SSL 证书有效性检查,我尝试了以下命令:
mvn clean install -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
我收到错误:
Unknown lifecycle phase ".wagon.http.ssl.insecure=true". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available
lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resou
rces, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy
maven 的
.wagon.http.ssl...
命令是否已弃用?如果是这样,有解决办法吗?
我知道我正在回答 6 个月前的问题,但我也犯了同样的错误,希望它能对某人有所帮助。
对我来说,解决方案是使用不同的终端应用程序。 在 Windows 10 64 位上,相同的复制粘贴命令“mvn clean package -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.insecure=true -DskipTests”在 Powershell/Windows 终端中失败运行 PS,但在标准 cmd.exe 中工作。