maven 安装本地jar失败 错误指南

Maven 安装本地 jar 失败

安装命令:

mvn install:install-file -Dfile=文件路径地址 -DgroupId=com.allinpay.sdk -DartifactId=top-sdk-java -Dversion=1.0.5 -Dpackaging=jar

错误描述 :

Unknown lifecycle phase “.allinpay.sdk”. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Avail
able lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-res
ources, process-test-resources, 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. -> [Help 1]

错误原因 :

存在特殊字符无法解析

更改后 :

mvn install:install-file -Dfile=文件地址 -DgroupId=“com.allinpay.sdk” -DartifactId=top-sdk-java -Dversion=“1.0.5” -Dpackaging=jar

可以看到文件的DgroupId加上双引号即可.

你可能感兴趣的:(maven,jar)