Sort maven dependencies in Eclipse

Viewed 20939

Just wanted to know if it is possible in Eclipse to sort Maven dependencies by alphabetical order?

It's bothering me to have a list of 200 jars not ordered... :(

7 Answers

Finally it is possible with Eclipse Photon now.

Just tick the checkbox Sort library entries alphabetically in Package Explorer under Preferences → Java → Appearance

See also here under 'Sort library entries alphabetically in Package Explorer'.

Unfortunately theres a bug, at least for me, that the source folders are also reordered, see here.

preferences

It worked for me when I used the Java perspective instead of the Java EE perspective. On my computer, the dependencies were not sorted in the Java EE perspective, also not when I checked the checkbox in Java | Appearance. I had to choose the Java perspective instead. Then the checkbox did work and I could have sorted dependencies.

I had an issue where Sort library entries alphabetically in Package Explorer under Preferences → Java → Appearance was checked, but the dependencies were still unsorted.

Right clicking the library path and clicking Show in -> System Explorer fixed the issue for me.

enter image description here

Related