[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:

博客记录了在使用Maven安装security-sdk-1.0.jar时,maven-install-plugin插件执行失败的报错信息,报错原因为插件或其依赖无法解析。解决办法是到C:\\Users\\Administrator\\.m2\\repository\\org\\apache\\maven\\plugins\\下删除maven-install-plugin文件夹,重新执行命令后安装成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

security-sdk-1.0.jar已经存在于D:/secServerSDK-test/src/main/resources/lib下

 

报错如下:

xxxxxx@xxxxxxxx /d/secServerSDK-test/src/main/resources/lib
$ mvn install:install-file -Dfile=security-sdk-1.0.jar -DgroupId=com.jd.security -DartifactId=security-sdk -D
version=1.0 -Dpackaging=jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install-file (default-cli) @ standalone-pom ---
Downloading: http://repo2.maven.org/maven2/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.922s
[INFO] Finished at: Fri Dec 12 14:48:39 CST 2014
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file (default-cli) on project
standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file failed:
Plugin org.apache.maven.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not be resolved: Could not t
ransfer artifact org.codehaus.plexus:plexus-digest:jar:1.0 from/to Nexus (http://repo2.maven.org/maven2): Error transfer
ring file: Connection reset -> [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/PluginResolutionException

 

解决办法:

事了好多办法,最后这样解决的:

1)到C:\Users\Administrator\.m2\repository\org\apache\maven\plugins\下删除maven-install-plugin文件夹重新执行上述命令就行了。

$ mvn install:install-file -Dfile=security-sdk-1.0.jar -DgroupId=com.jd.security -DartifactId=security-sdk -D
version=1.0 -Dpackaging=jar
[INFO] Scanning for projects...
Downloading: http://repo2.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.
1.pom
Downloaded: http://repo2.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1
.pom (5 KB at 1.3 KB/sec)
Downloading: http://repo2.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.
1.jar
Downloaded: http://repo2.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1
.jar (23 KB at 1.7 KB/sec)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install-file (default-cli) @ standalone-pom ---
Downloading: http://repo2.maven.org/maven2/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar
Downloaded: http://repo2.maven.org/maven2/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar (12 KB at 9.5 KB/s
ec)
[INFO] Installing d:\secServerSDK-sgh-test\src\main\resources\lib\security-sdk-1.0.jar to C:\Users\Administrator\.m2\rep
ository\com\jd\security\security-sdk\1.0\security-sdk-1.0.jar
[INFO] Installing C:\Users\ADMINI~1\AppData\Local\Temp\mvninstall1506241331627767621.pom to C:\Users\Administrator\.m2\r
epository\com\jd\security\security-sdk\1.0\security-sdk-1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.746s
[INFO] Finished at: Fri Dec 12 14:55:46 CST 2014
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------

至于原因,不是特别清楚,做个笔记吧!!!

转载于:https://www.cnblogs.com/shanguanghui/p/4159746.html

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project sky-common: Fatal error compiling: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field &#39;com.sun.tools.javac.tree.JCTree qualid&#39; -> [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/MojoExecutionException Process finished with exit code 1 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>spring-boot-starter-parent</artifactId> <groupId>org.springframework.boot</groupId> <version>2.7.3</version> </parent> <groupId>com.sky</groupId> <artifactId>sky-take-out</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <modules> <module>sky-common</module> <module>sky-pojo</module> <module>sky-server</module> </modules> <properties> <mybatis.spring>2.2.0</mybatis.spring> <lombok>1.18.20</lombok> <fastjson>1.2.76</fastjson> <commons.lang>2.6</commons.lang> <druid>1.2.1</druid> <pagehelper>1.3.0</pagehelper> <aliyun.sdk.oss>3.10.2</aliyun.sdk.oss> <knife4j>3.0.2</knife4j> <aspectj>1.9.4</aspectj> <jjwt>0.9.1</jjwt> <jaxb-api>2.3.1</jaxb-api> <poi>3.16</poi> </properties> <dependencyManagement> <dependencies> <dependency>
04-01
"D:\JAVA JDK\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\code\EPM\epmcloud-pdm-server -Djansi.passthrough=true -Dmaven.home=D:\maven\apache-maven-3.6.3 -Dclassworlds.conf=D:\maven\apache-maven-3.6.3\bin\m2.conf "-Dmaven.ext.class.path=D:\JAVAIDEA\JetBrains\IntelliJ IDEA Community Edition 2024.2.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\JAVAIDEA\JetBrains\IntelliJ IDEA Community Edition 2024.2.1\lib\idea_rt.jar=62728:D:\JAVAIDEA\JetBrains\IntelliJ IDEA Community Edition 2024.2.1\bin" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath D:\maven\apache-maven-3.6.3\boot\plexus-classworlds-2.6.0.jar;D:\maven\apache-maven-3.6.3\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2024.2.1 -s D:\maven\apache-maven-3.6.3\conf\settings-epm.xml -Dmaven.repo.local=D:\maven\maven-erdc install [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for epm.cloud:epmcloud-pdm-starter:pom:3.1.2 [WARNING] &#39;dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)&#39; must be unique: erd.cloud:erdcloud-mq-client:jar -> duplicate declaration of version ${erdcloud-sdk.version} @ epm.cloud:epmcloud-pdm-server:3.1.2, D:\code\EPM\epmcloud-pdm-server\pom.xml, line 273, column 25 [WARNING] [WARNING] Some problems were encountered while building the effective model for epm.cloud:epmcloud-pdm-server:pom:3.1.2 [WARNING] &#39;dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)&#39; must be unique: erd.cloud:erdcloud-mq-client:jar -> duplicate declaration of version ${erdcloud-sdk.version} @ line 273, column 25 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] epmcloud-pdm-server [pom] [INFO] epmcloud-pdm-sdk [jar] [INFO] epmcloud-pdm-api [jar] [INFO] epmcloud-pdm-service [jar] [INFO] epmcloud-pdm-starter [pom] [INFO] epmcloud-pdm-app [jar] [INFO] epmcloud-pdm-plugin [pom] [INFO] epmcloud-pdm-sso [jar] [INFO] [INFO] -------------------< epm.cloud:epmcloud-pdm-server >-------------------- [INFO] Building epmcloud-pdm-server 3.1.2 [1/8] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for epmcloud-pdm-server 3.1.2: [INFO] [INFO] epmcloud-pdm-server ................................ FAILURE [ 1.281 s] [INFO] epmcloud-pdm-sdk ................................... SKIPPED [INFO] epmcloud-pdm-api ................................... SKIPPED [INFO] epmcloud-pdm-service ............................... SKIPPED [INFO] epmcloud-pdm-starter ............................... SKIPPED [INFO] epmcloud-pdm-app ................................... SKIPPED [INFO] epmcloud-pdm-plugin ................................ SKIPPED [INFO] epmcloud-pdm-sso ................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.642 s [INFO] Finished at: 2025-08-05T14:11:12+08:00 [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "nexus" could not be activated because it does not exist. [ERROR] Failed to execute goal on project epmcloud-pdm-server: Could not resolve dependencies for project epm.cloud:epmcloud-pdm-server:pom:3.1.2: Failed to collect dependencies at erd.cloud:erdcloud-mq-client:jar:3.2.4 -> erd.cloud:erdcloud-mq-rocketmq:jar:3.2.4-1 -> org.apache.rocketmq:rocketmq-spring-boot-starter:jar:2.3.1 -> org.apache.rocketmq:rocketmq-spring-boot:jar:2.3.1 -> org.apache.rocketmq:rocketmq-client:jar:5.3.0 -> org.apache.rocketmq:rocketmq-remoting:jar:5.3.0 -> org.apache.rocketmq:rocketmq-common:jar:5.3.0 -> io.grpc:grpc-netty-shaded:jar:1.53.0 -> io.grpc:grpc-core:jar:[1.53.0]: No versions available for io.grpc:grpc-core:jar:[1.53.0] within specified range -> [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/DependencyResolutionException
最新发布
08-06
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值