An internal error occurred during: “Updating Maven

2019-03-07 22:09发布

As the title mentioned I have the following problem: I use Eclipse with Maven Nature and when I update my Maven Project, I get this error:

An internal error occurred during: "Updating Maven Project".
Unsupported IClasspathEntry kind=4

The solution that always comes back is the following:

  • rightclick project, remove maven nature
  • mvn eclipse:clean (with project open in eclipse/STS)
  • (sometimes they suggest to do mvn eclipse:eclipse next)
  • rightclick project and reenable maven nature

Now I exhaustively tried all combinations several times. But I always keep getting the above error. The error starting occurring when I had to mvn eclipse:eclipse the project. Before it was always running fine using only m2eclipse features and setting everything in eclipse.

13条回答
等我变得足够好
2楼-- · 2019-03-07 22:31

It helped in my case

rightclick project, remove maven nature mvn eclipse:clean (with project open in eclipse/STS) delete the project in eclipse (but do not delete the sources) Import existing Maven project

查看更多
淡お忘
3楼-- · 2019-03-07 22:41

After trying all these procedures it still didn't work for me. What did work was

  1. go into File Explorer and delete the .classpath file under the project's root folder
  2. run Maven update within Eclipse, and check Force update of Snapshots/Releases

Our current work required integrating a number of disparate projects so unfortunately use of SNAPSHOTs in a production environment were required (taboo in Maven circles)!

查看更多
做自己的国王
4楼-- · 2019-03-07 22:41

I have that problem and my solution is going source folder and run command line: mvn clean install -DskipTests eclipse:eclipse then return eclipse workspace and refresh project. Hope that help!

查看更多
干净又极端
5楼-- · 2019-03-07 22:45

Your command line mvn eclipse project generator may not be the same version as that of your eclipse, and eclipse doesn't understand for your command line tool is generating. Just use eclipse's in this case:

  • remove the project from eclipse (including all modules if multi-module)
  • run: rm -rf .settings/ .project .classpath to delete eclipse project files, also from modules
  • import your project as an existing maven project
查看更多
男人必须洒脱
6楼-- · 2019-03-07 22:45

My tricky solution is:

  1. Open your windows Task Manager,
  2. Find the Javaw.exe process and highlight it, then End it by End Process
  3. In eclipse project browser, right click it and use Maven -> Update Project again.

Issue is resolved.

If you have Tomcat Server Running in Eclipse, you need to refresh project before restart Tomcat Server.

查看更多
小情绪 Triste *
7楼-- · 2019-03-07 22:49

This is all you need:

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

  2. Open you terminal, navgate to your project folder and run mvn eclipse:clean

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

  4. Right click on your Project and select Maven -> Update Project

查看更多
登录 后发表回答