背景

mvn install 报错,无法打包,报错提示如下:

 mvn install -U
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: 'profile' (position: START_TAG seen ...</profiles>\r\n\t<profile>... @314:11)  @ /root/.m2/settings.xml, line 314, column 11
[WARNING]
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< com.chot:MFG_ETL >--------------------------
[INFO] Building MFG_ETL L01.01.003
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.160 s
[INFO] Finished at: 2022-12-22T14:21:07+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to parse plugin descriptor for org.apache.maven.plugins:maven-compiler-plugin:3.8.1 (/opt/maven_repo/MavenRepository/org/apache/maven/plugins/maven-compiler-plugin/3.8.1/maven-compiler-plugin-3.8.1.jar): No plugin descriptor found at META-INF/maven/plugin.xml -> [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/PluginDescriptorParsingException

试问一下chatGPT

遇到这个问题先google 了一番,没有很明确的答案,问了一下小C它给出了几个可能的原因,并在它的协助下我解决了这个问题,感觉stackflow不应该ban它。

在这里插入图片描述
最终

  • 你指定的插件版本不正确,或者该版本的插件不存在。在这种情况下,可以尝试更新插件版本或者重新下载一个新的 jar 包。
    更换了pom引用中的maven-plugin 版本。打包成功
    在这里插入图片描述

更多推荐