Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I've rolled onto a maven project that when I run mvn clean install from command line builds and runs fine. I had this project displaying in Eclipse without errors earlier in the week before I hosed my system. This makes me think I have a configuration wrong and hoping someone can give me a sanity check.

Inside of Eclipse, I'm seeing reported errors related to org.springframework cannot be resolved to a type in files in paths like <project_path>/target/<project>-<version>/WEB-INF/... What is catching my eye is that path of target which is a derived folder.

Maven Dependencies Showing:

enter image description here

Facets Enabled:

enter image description here

Project Explorer View:

enter image description here

From the above screenshots, you can see that the related jar files are pulled properly from the maven dependencies. Any ideas on what I have misconfigured and why I'm seeing the errors from the target path?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
2.3k views
Welcome To Ask or Share your Answers For Others

1 Answer

The build and WebContent folders indicate that you haven't properly imported Maven project into the Eclipse, hence errors.

One of the way to fix this:

  • Delete project from the Eclipse.

  • Go to project folder and delete all not needed folders. (Leave src).

  • Go to Eclipse click File -> Import..., select Existing Maven Projects, select your project folder, Finish.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...