在maven中导入jar包时出现的错误

在maven中导入jar包时出现的错误

错误报告:

在相应文件目录中找不到文件,发现文件名多了一个问号

[INFO] — maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom —
[ERROR] The specified file ‘C:\Users\Administrator\Desktop\lianpay_common_security-0.0.1.jar***?***-DgroupId=lianpay_common_security’ not exists
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.237 s
[INFO] Finished at: 2020-03-10T14:34:50+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project standalone-pom: The specified file ‘C:\Users\Administrator\Desktop\lianpay_common_security-0.0.1.jar?-DgroupId=lianpay_common_security’ not exists -> [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

原因纠正

在复制命令行代码时,空格键输入错误 将空格键删除后重新输入 编译成功

成功后:

C:\Windows\System32>mvn install:install-file -Dfile=“C:\Users\Administrator\Desktop\lianpay_common_security-0.0.1.jar” -DgroupId=lianpay_common_security -DartifactId=lianpay_common_security -Dversion=0.0.1 -Dpackaging=jar
[INFO] Scanning for projects…
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] — maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom —
[INFO] Installing C:\Users\Administrator\Desktop\lianpay_common_security-0.0.1.jar to E:\jar\lianpay_common_security\lianpay_common_security\0.0.1\lianpay_common_security-0.0.1.jar
[INFO] Installing C:\Users\ADMINI~1\AppData\Local\Temp\mvninstall1108578841017892212.pom to E:\jar\lianpay_common_security\lianpay_common_security\0.0.1\lianpay_common_security-0.0.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.795 s
[INFO] Finished at: 2020-03-10T14:35:26+08:00
[INFO] ------------------------------------------------------------------------

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值