Maven 编译提示:spring-boot-maven-plugin:2.1.9.RELEASE or one of its dependencies could not be resolved
Posted 在奋斗的大道
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Maven 编译提示:spring-boot-maven-plugin:2.1.9.RELEASE or one of its dependencies could not be resolved相关的知识,希望对你有一定的参考价值。
问题描述:今天使用mava-plugin 插件遍历Maven项目提示如下错误信息:
[ERROR] Plugin org.springframework.boot:spring-boot-maven-plugin:2.1.9.RELEASE or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.springframework.boot:spring-boot-maven-plugin:jar:2.1.9.RELEASE: 1 problem was encountered while building the effective model for org.springframework.boot:spring-boot-maven-plugin:2.1.9.RELEASE
[ERROR] [FATAL] Non-parseable POM C:\\Users\\zzg\\.m2\\repository\\org\\springframework\\boot\\spring-boot-parent\\2.1.9.RELEASE\\spring-boot-parent-2.1.9.RELEASE.pom: processing instruction can not have PITarget with reserved xml name (position: END_TAG seen ...</issueManagement>\\n</project>\\n<?xml ... @46:7) @ C:\\Users\\zzg\\.m2\\repository\\org\\springframework\\boot\\spring-boot-parent\\2.1.9.RELEASE\\spring-boot-parent-2.1.9.RELEASE.pom, line 46, column 7
[ERROR] -> [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、maven-plugin插件读取指定jar 失败。
2、maven-plugin无法加载 C:\\Users\\zzg\\.m2\\repository\\org\\springframework\\boot\\spring-boot-parent\\2.1.9.RELEASE\\spring-boot-parent-2.1.9.RELEASE.pom, 因为xml 文件中包含PITarget
(=spring-boot-parent-2.1.9.RELEASE.jar 没有正常加载)
解决版本:
移除C:\\Users\\zzg\\.m2\\repository\\org\\springframework\\boot\\spring-boot-parent\\2.1.9.RELEASE 文件夹,重新编译Maven 项目
C:\\workspace\\Single>mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< com.digipower:Single >------------------------
[INFO] Building Single 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/springframework/boot/spring-boot-parent/2.1.9.RELEASE/spring-boot-parent-2.1.9.RELEASE.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/springframework/boot/spring-boot-parent/2.1.9.RELEASE/spring-boot-parent-2.1.9.RELEASE.pom (1.8 kB at 1.7 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/springframework/boot/spring-boot-maven-plugin/2.1.9.RELEASE/spring-boot-maven-plugin-2.1.9.RELEASE.jar
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/springframework/boot/spring-boot-maven-plugin/2.1.9.RELEASE/spring-boot-maven-plugin-2.1.9.RELEASE.jar (68 kB at 103 kB/s)
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ Single ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ Single ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to C:\\workspace\\Single\\target\\classes
[INFO] /C:/workspace/Single/target/generated-sources/annotations/com/single/entity/helper/UcasAuthUserMapping.java: 某些输入文件使用了未经检查或不安全的操作。
[INFO] /C:/workspace/Single/target/generated-sources/annotations/com/single/entity/helper/UcasAuthUserMapping.java: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.832 s
[INFO] Finished at: 2021-11-03T11:08:32+08:00
[INFO] ------------------------------------------------------------------------
以上是关于Maven 编译提示:spring-boot-maven-plugin:2.1.9.RELEASE or one of its dependencies could not be resolved的主要内容,如果未能解决你的问题,请参考以下文章
IDEA使用lombok,装好插件和在maven里加了依赖包后编译提示没有找到get/set方法
Maven 编译提示:spring-boot-maven-plugin:2.1.9.RELEASE or one of its dependencies could not be resolved
maven在本地编译没有问题。到服务器上部署就会报错 ,这个类有在 Pom.xml配了,但还是提示找不到。
[转]在Eclipse整合Maven3.6.3插件导入maven项目并编译时,控制台提示No compiler is provided in this environment. Perhaps you
Maven编译失败,提示No compiler is provided in this enviroment. Perhaps you are running on a JRE rathen a JD