Maven : Cannot deploy artifact from the local repository

1.美图

在这里插入图片描述

2.背景

maven deploy 一个本地仓库的jar

base) lcc@lcc nexus-3.22.0-02$ ll /Users/lcc/soft/maven/repo/org/apache/flink/flink-core/1.10.0/flink-core-1.10.0.jar
-rw-r--r--  1 lcc  staff  1573078  3 21 08:16 /Users/lcc/soft/maven/repo/org/apache/flink/flink-core/1.10.0/flink-core-1.10.0.jar
(base) lcc@lcc nexus-3.22.0-02$ mvn deploy:deploy-file -DgroupId=org.apache.flink -DartifactId=flink-core -Dversion=1.10.0 -Dpackaging=jar -Dfile=/Users/lcc/soft/maven/repo/org/apache/flink/flink-core/1.10.0/flink-core-1.10.0.jar -Durl=http://localhost:8081/repository/maven-lcc/ -DrepositoryId=nexus
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) @ standalone-pom ---
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar (0 B at 0 B/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.232 s
[INFO] Finished at: 2020-03-30T12:30:18+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file (default-cli) on project standalone-pom: Cannot deploy artifact from the local repository: /Users/lcc/soft/maven/repo/org/apache/flink/flink-core/1.10.0/flink-core-1.10.0.jar -> [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 followin

原文链接:https://blog.csdn.net/qq_21383435/article/details/105194781

3.错误原因

不能从本地仓库deploy包。

4.解决方法

将jar包从本地仓库中复制到其它目录,使用其它目录进行deploy即可。

发布了1152 篇原创文章 · 获赞 454 · 访问量 145万+

猜你喜欢

转载自blog.csdn.net/qq_21383435/article/details/105197034
今日推荐