maresa
maresa

Reputation: 641

How do I fix Eclipse project where maven dependencies are listed right under project but also under 'Maven Dependencies' folder?

I have this weird problem. It was working fine, but lately after some developers joined the project, all of a sudden Maven dependencies are listed both under Maven Dependencies folder as well as under the project. Please see pic. I've highlighted a sample dependency that's listed twice.

enter image description here

So far, it seems like the project compiles fine, etc etc. But it just annoys me to see that. Any ideas how to fix it?

Thank you.

Upvotes: 0

Views: 77

Answers (1)

ujulu
ujulu

Reputation: 3309

This might happen when people insert external dependencies manually in the build path as follows:

Select Project > Right Click > Properties > Java Build Path > Add External JARs...

You can get rid of unwanted external libraries by removing them from the top level list (don't remove JRE System Library and Maven Dependencies). As these libraries are managed by Maven you don't need to include them into the project manually.

And the reason why you're seeing configuration changes of other developers is that when Eclipse .settings, .classpath and .project files are checked into the Repository. (Remove these entries from the repository if you have authorization to do so and you'll have a clean repository.)

Upvotes: 1

Related Questions