Maven2: Missing artifact but jars are in place
There are a few other options apart from Project->Clean, some of which are more along the lines of turning it off and on again.
- Try right-clicking on the project and selecting Maven->Update Project Configuration.
- Disable then re-enable dependency management (right-click Maven->Disable Dependency Management then Maven->Enable Dependency Management
- Close the project and reopen it.
- Check that your Maven settings are configured correctly. If you are behind a proxy you'll need to configure the proxy settings in the global or user settings.
- Check you're using the Maven installation you expect. By default m2eclipse uses the embedder, if you have a separate installation you may want to configure m2eclipse to use the external installation so that CLI and Eclipse builds are consistent. This also ensures you're configured to connect through any proxy as above.
I received this same issue on SpringSource Tools ver 2.8.0.RELEASE. I had to do Maven -> Update Maven Dependencies and check the option for "Force Update of Snapshot/Releases".
I encountered similar issue. The missing artifacts (jar files) exists in ~/.m2 directory and somehow eclipse is unable to find it.
For example: Missing artifact org.jdom:jdom:jar:1.1:compile
I looked through this directory ~/.m2/repository/org/jdom/jdom/1.1 and I noticed there is this file _maven.repositories. I opened it using text editor and saw the following entry:
#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Wed Feb 13 17:12:29 SGT 2013
jdom-1.1.jar>central=
jdom-1.1.pom>central=
I simply removed the "central" word from the file:
#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Wed Feb 13 17:12:29 SGT 2013
jdom-1.1.jar>=
jdom-1.1.pom>=
and run Maven > Update Project from eclipse and it just worked :) Note that your file may contain other keyword instead of "central".
I had the same problem. Rich Seller's solution didn't work for my situation, I fixed it by cancel the Window -> Preferences -> Maven
. Do not automatically update dependencies from remote repositories
option, then right-clicking on the project and selecting Maven->Update Project
.