Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse | Maven : Multiple annotations found at this line

I'm trying to import a maven project into Eclipse.

I'm using Helios. I've downloaded m2eclipse. I've imported the project.

But I'am having so much troubles to compile the project.

The full project contains 5 Eclipse projects, ie: prj1, prj2, prj3, prj4 and prj5

If I look the (Eclipse) marker at prj1/pom.xml I have this troubles:

Multiple annotations found at this line:
    - Missing artifact log4j:log4j:jar:1.2.15:compile
    - Missing artifact org.apache.xmlbeans:xmlbeans-xpath:jar:2.4.0:compile
    - Missing artifact org.apache.ws.commons.axiom:axiom-dom:jar:1.2.5:compile
    - Missing artifact org.apache.httpcomponents:httpcore:jar:4.0-alpha5:compile

.... and so many more ...

If I understood how maven works those dependecies must be downloaded my maven, am I wrong?

Why is it that those dependencies are not being downloaded? Should I download one by one, by hand?

like image 797
nacho Avatar asked May 16 '11 18:05

nacho


1 Answers

It is not a unique issue, happens every now and then (sometimes due to a slow connection and sometimes due to proxy servers not allowing to download)

You can get rid of this by either of the following ways:

1) Force Update: Right Click on the Project in Eclipse -> Maven -> Update Project On this screen select the check box Force Update for Snapshots/Releases

enter image description here

2) Clearing Maven Cache: If you are still facing a problem, go to the local repository on your system, which might be present at C:\Users\myusername\.m2\repository and delete the .cache folder and then follow step 1.

If you're still facing issues after this, manually go to the org/apache folder and delete everything and then follow step 1. (This will definitely solve the issue.)

like image 85
dharam Avatar answered Oct 17 '22 10:10

dharam