Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Resources Folder Error In Eclipse

i am importing a spring maven project in eclipse (helios with maven plugin) i built the project in terminal, and everything is ok, and eclipse shows no errors in xml or java classes, but still it shows an error mark on Java Resources Folder, no idea why ? any ideas ?

like image 439
Mahmoud Saleh Avatar asked Sep 11 '11 11:09

Mahmoud Saleh


1 Answers

Well, it might just be because there are some folders containing classes which are treated as source folders by maven (that's why the maven command line compile works) but not as such when using .m2 eclipse plugin to import your project into eclipse.

Here's some things you might try:

in the properties of your eclipse project, go to java build path, select sources, and check to see if all needed source fodlers are added (as source folders). If some are missing, just add them manually using add sources... button

Sometimes, once you do a maven clean in the command line, the eclipse project will show errors because it no longer finds the compiled classes (they were cleaned by maven). Doing a Project-> clean on your eclipse project usually solves this

Try adding the project into eclipse as a plain ole eclipse project: do a mvn eclipse:eclipse, then import it into eclipse as eclipse project (not maven project)

like image 62
Shivan Dragon Avatar answered Oct 11 '22 02:10

Shivan Dragon