How to fix error “Updating Maven Project”. Unsuppo

2019-01-09 21:06发布

I have imported maven project in STS, when I run update update project I receive:

"Updating Maven Project". Unsupported IClasspathEntry kind=4

Is there a workaround for this?

15条回答
Viruses.
2楼-- · 2019-01-09 21:06

I'm using Eclipse 4.3.2 (Kepler) with M2E 1.4.x and felt over this problem several times!

In my case the "mvn eclipse:eclipse" command also generates Checkstyle, PMD and Findbugs configuration so "mvn eclipse:clean" does not help me because it drops all those config files again.

The best solution for me was to delete all ".classpath" files:

find . -name ".classpath" -delete

and import the project into eclipse afterwards.

查看更多
该账号已被封号
3楼-- · 2019-01-09 21:09
  1. Make sure that the version of the m2e(clipse) plugin that you're running is at least 1.1.0

  2. Close maven project - right click "Close Project"

  3. Manualy remove all classpathentry with kind="var" in .classpath file
  4. Open project

or

  1. Remove maven project
  2. Manualy rmeove .classpath 4 Reimport project
查看更多
趁早两清
4楼-- · 2019-01-09 21:09

Seeing all other answers. I found for me a simpler way.

I just removed all lines in the .classpath (editing with eclipse) containing a var and used maven -> update project without an error.

查看更多
不美不萌又怎样
5楼-- · 2019-01-09 21:14

Sometimes, even re-importing the Maven project will not work. Updating the project correctly in eclipse is not a deterministic process. The only 100% fail safe procedure I've found is:

  1. Disable Maven Nature, run mvn eclipse:clean, restart, cross your fingers and Pray 3 times.
  2. If this won't work, delete the project, run mvn eclipse:clean, re-import refresh, pray and use the force.
  3. If this still doesn't work, restart Eclipse, or even better your computer. While waiting for the reboot, you can make a random donation to fix your Karma. Repeat step 2 and don't forget to pray and control your anger. Anger leads to hate. Hate leads to suffering.
  4. Try all the other answers posted in this thread. You might need to try them all for 3 times at least before giving up.
  5. Format your Computer, re-install Eclipse and Maven. No need to pray anymore, all gods hate you anyway
  6. Delete your git project, burn the physical drive that stored the remote repository, and write your project from scratch.
  7. Find a time machine, travel to the past and convince yourself to follow another, non-programming career or at least to avoid Java
查看更多
贼婆χ
6楼-- · 2019-01-09 21:15

This issue (https://bugs.eclipse.org/394042) is fixed in m2e 1.5.0 which is available for Eclipse Kepler and Luna from this p2 repo :

http://download.eclipse.org/technology/m2e/releases/1.5

If you also use m2e-wtp, you'll need to install m2e-wtp 1.1.0 as well :

http://download.eclipse.org/m2e-wtp/releases/luna/1.1

查看更多
劫难
7楼-- · 2019-01-09 21:16

Have you tried:

  1. If you have import project into the eclipse 4, please delete it.
  2. In maven consol, run: mvn eclipse:clean
  3. In Eclipse 4: File -> Import -> Maven -> Existing Maven Projects
查看更多
登录 后发表回答