eclipse up-to-date with pom.xml. Run Maven 解决

本文介绍了在使用Eclipse进行Maven项目开发时遇到的一些常见问题及其解决方案,包括项目配置与pom.xml不同步、更新项目时出现内部错误、以及导入Maven项目时遇到Unsupported IClasspathEntry等问题。

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

Description for eclipse: Project configuration is not up-to-date with pom.xml. Run Maven->Update Project or use Quick Fix.

解决办法:右键项目,找到maven菜单,点击update Project确定ok。


之后又出现:An internal error occurred during: "Updating Maven Project". Unsupported I问题

解决办法:

1. Right-click on your project, select Maven -> Remove(disable) Maven Nature.

2. Open you terminal, go to your project folder and do “mvn eclipse:clean”

3. Right click on your Project and select “Configure -> Convert into Maven Project”

然后可以重新刷新mvn项目了

导入maven项目呈现 Unsupported IClasspathEntry kind=4

原因:是因为应用spring ide应用了m2eclipse 插件,然则这个插件的应用前提是不容许号令 mvn eclipse:eclipse在项目上履行过,若是履行过,就会抛出这个异常。

去掉项目标maven特点,右键菜单就能去除,然后履行 mvn eclipse:clean,从头引入maven工程,不是java项目。


[INFO] Scanning for projects... [INFO] [INFO] ------------------------< com.example:demo-36 >------------------------- [INFO] Building demo-36 0.0.1-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- resources:3.2.0:resources (default-resources) @ demo-36 --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] [INFO] --- compiler:3.8.1:compile (default-compile) @ demo-36 --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- resources:3.2.0:testResources (default-testResources) @ demo-36 --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory D:\360MoveData\Users\86176\Desktop\实验报告及实验源码\实验报告及实验源码\实验源码\wegame\a\demo36\src\test\resources [INFO] [INFO] --- compiler:3.8.1:testCompile (default-testCompile) @ demo-36 --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to D:\360MoveData\Users\86176\Desktop\实验报告及实验源码\实验报告及实验源码\实验源码\wegame\a\demo36\target\test-classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.622 s [INFO] Finished at: 2025-03-07T23:28:45+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project demo-36: Fatal error compiling: 无效的目标发行版: 11 -> [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
03-08
mvn compile [INFO] Scanning for projects... [INFO] [INFO] ----------------< org.apache.zookeeper:zookeeper-jute >----------------- [INFO] Building Apache ZooKeeper - Jute 3.10.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- mavanagaiata:0.9.4:commit (find-current-git-revision) @ zookeeper-jute --- [INFO] [INFO] --- maven-antrun-plugin:1.8:run (set-hostname-property) @ zookeeper-jute --- [INFO] Executing tasks main: [INFO] Executed tasks [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-maven-version) @ zookeeper-jute --- [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (banned-commons-lang) @ zookeeper-jute --- [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (banned-commons-lang3) @ zookeeper-jute --- [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (banned-json-simple) @ zookeeper-jute --- [INFO] [INFO] --- javacc-maven-plugin:2.6:javacc (javacc) @ zookeeper-jute --- [INFO] Skipping - all parsers are up to date [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (pre-compile-jute) @ zookeeper-jute --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 34 source files to /root/soft/zookeeper/zookeeper-jute/target/classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.949 s [INFO] Finished at: 2025-06-15T16:32:32Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (pre-compile-jute) on project zookeeper-jute: Fatal error compiling: error: release version 8 not supported -> [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
最新发布
06-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值