Visitors are also reading...
← PreviousNext →

Troubleshooting Missing Artifact in Eclipse Maven Repository -

01 Jan 2013

I found 2 reasons that cause this error in Eclipse.

I have a solution for both.

Maven Repository Index Does Not Refresh

I don't have a way to reproduce the problem, but the symptoms are quite clear.

It seems that Maven's view of the repository does not match its real state.

The Solution

The solution for this is quite simple. On the repository view ( Window ==> View ==> Other ==> Maven Repository )
you should focus on the unsynched repository ( mine was the local repository )
and then right click and choose "reindex"
If reindex is disabled, it means you are not standing on the repository node, but on some other node.

It is unclear to me at all why Eclipse would have a feature for exploring Maven repository.
If Maven does not have

Disable workspace Resolution While Project In Workspace

To reproduce this you need to projects : projectA and projectB.
Both project use Maven.
projectA should have a dependency on projectB.
Set up an Eclipse workspace with both projects.
Right click on projectA and go to "Maven ==> Disable Workspace Resolution"
Clean / Update / Rebuild projects.
You get a "Missing Artifact" error message.

It seems to me that this is a bug in Eclipse's integration with Maven.
If both projects are open in the workspace, Eclipse forces you to use Integration Resolution.
To resolve this you must resort to closing the project you are not working on.

← PreviousNext →