This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
It's pretty hard to find a dependency in the project tree if the project has many (transitive) dependencies. The order looks somehow random and you have to search through the whole list of dependencies. it would be really nice to be able to sort them alphabetically by name (or maybe by "group id" and then by "artifact id" in case of maven deps)
Not sure exactly how this would work. Currently we show dependencies in natural order as returned from the model, which would be direct dependencies first in POM order, then transitive dependencies (maybe via breadth-first traversal?). If resorting the list, presumably you would still want to keep direct dependencies at the top. And this cannot I think be the default, since it would lose information: the current view shows how the classpath will be constructed, which could matter in case two artifacts contain a class of the same name.
Hmm, well so the current way also has its merits... The reason I'd like to have this is so I can quickly see multiple versions of the same lib (which is currently pretty hard, because everything is so cluttered in the dependencies subtree) and to browse through a specific dependency. Maybe you can think of another way of achieving this? Maybe another small list window with sort and browse capability?
(In reply to comment #2) > The reason I'd like to have this is so I can quickly see multiple versions of > the same lib (which is currently pretty hard, because everything is so > cluttered in the dependencies subtree) and to browse through a specific > dependency. > Can you elaborate more on the usecase? in my understanding you can always have just one version of any library in the resolved dependencies only. Always just one version wins for a given artifact, or the build fails if ranges required don't overlap. might not be what you want but if you start typing in the projects explorer with dependencies node expanded, the first node matching your query will be selected.
Created attachment 119615 [details] duplicate dependencies
Hi! Well, I have proof in front of me ;-) (Although due to NDAs I can't share it with you. At least I made a small screenshot...) I have a project that depends on another Project, both define a dependency to a certain lib in different versions. The result was that I had two versions of the lib in the dependencies subtree. It compiled and worked as far as I could see, but I excluded the other dependency afterwards to avoid problems. The find as you type hint is good, I didn't knew that!
fine, on the UI side it's possible mainly because we show the artifactId in view, but 2 distinct artifacts can have the same artifactId but different groupId.
OMG, you are right... One package belongs to another group id. Sorry for the disturbance, I need to go to hit the developer responsible for the name with a large bat... ;-)
sorry
In fact it seems the IDE already _does_ sort dependencies by artifactId, with direct first. DependenciesNode.DependenciesComparator has: boolean transitive1 = art1.getArtifact().getDependencyTrail().size() > 2; boolean transitive2 = art2.getArtifact().getDependencyTrail().size() > 2; if (transitive1 && !transitive2) { return 1; } if (!transitive1 && transitive2) { return -1; } int ret = art1.getArtifact().getArtifactId().compareTo(art2.getArtifact().getArtifactId()); if (ret != 0) { return ret; } return art1.getArtifact().compareTo(art2.getArtifact()); Tested on Hudson/Jenkins plugin for Mercurial, which has more than a screenful of dependencies, and it seemed reasonable.
Created attachment 119620 [details] First screenful of Mercurial plugin's dependencies