Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide "Maven Dependencies" in Package Explorer

Tags:

eclipse

maven

m2e

Is there a way to hide the Maven Dependencies classpath container in the Package Explorer? Everytime I jump into a class of a dependency, the Maven Dependencies tree is expanded to the class (if "Link with Editor" is selected, which is my preferred setting). Navigating to own classes or resources then requires lots of scrolling in the Package Explorer, which is quite annoying.

Is there a way to hide the "Maven Dependencies" classpath container or avoid that its get expanded automatically without having to deactivate "Link with Editor"?

enter image description here

like image 918
James Avatar asked Feb 04 '14 08:02

James


People also ask

How do I delete a dependency in Maven?

Open the pom file and click on dependency Hierarchy. Select the the jar you want to delete. Right click and click on Exclude Maven Artifact.

Where can I find dependencies in Maven?

In your project's POM, press Ctrl and hover the mouse over the dependency. Click the dependency to open the dependency's POM. In the dependency POM, view the active dependency, its transitive dependencies and their versions. You can check the origin from which the dependency was pulled in.


2 Answers

There is a small triangle in the Package Explorer's upper right corner. You can create Filters to hide stuff (either by name, or maybe there is a hide Maven modules built-in filter by default depending on which plugin you use). I think that could help you.

enter image description here

enter image description here

like image 73
rlegendi Avatar answered Oct 15 '22 19:10

rlegendi


Eclipse also has a predefined filter "Hide libraries from external" that will solve your issue. At least in Luna

like image 37
borjab Avatar answered Oct 15 '22 20:10

borjab