Repository navigation
Build the Maven dependency tree with Maven Resolver instead of maven-dependency-tree - #9694
Conversation
|
checked a few friend packages I could still find inactive: active, but no most of the other stuff looks like modules within this repo (some of it doesn't exist anymore too, e.g -> we should be fine |
0dc1381 to
dfe9dca
Compare
|
Switched |
|
Can't believe it's green. Or too early to celebrate? |
its a good sign from the CI gremlins! Some of the CI jobs are a bit brittle and need restarts, so a single failure wouldn't necessarily mean its a regression. We would create the release branches for NB 32 this week (~15th). I think #9642 has a small chance to make it still in - mostly because its not clear if anyone tested it beside me. Putting NB 33 milestone on this PR here. Thanks a lot for helping with this btw! |
To early with 3.10 yet. Wait for few more patch releases - i'll take look next week to report/fix issues with upgrade |
fc0fdb6 to
e728efd
Compare
|
@slachiewicz we might have to bump a few versions due to the API change. Its less important due to it being friend deps but it doesn't hurt. I added a commit, feel free to squash it with your changes: |
|
(also let me know if you want me to take over this PR, i can squash the changes into your commit) |
|
I'm ok, if all works it's ready for final review. |
|
cool. will rebase ontop of latest master (+fix conflicts) and squash both commits into one + force push. If everything is green again i think we can get this in. I tested it manually already. |
…dependency-tree DependencyTreeFactory now collects the project graph with the Maven Resolver conflict resolver in verbose mode and returns a NetBeans-owned DependencyNode, so the unmaintained maven-dependency-tree 2.2 jar and its friend packages go. Bump maven.embedder to 3.0 after dropping maven-dependency-tree Assisted-by: Claude Opus 5.5
e728efd to
e2e7c56
Compare
|
LGTM, and as integrated early for nb33 it's safe |
|
@slachiewicz thanks for helping with this and the MVN 3.10 PR too! |
jtulach
left a comment
There was a problem hiding this comment.
Nice work. Hopefully it works well. From my perspective I am glad to see bump in the implementation version to signal incompatible change in the API. E.g. this seems to be versioned properly. Thanks for the contribution.
DependencyTreeFactorystill built trees with maven-dependency-tree 2.2 (2014), whoseDependencyTreeBuildergoes through maven-compat's legacyArtifactCollector— theTODO: check alternative for deprecated maven componentsin that class. This replaces it with Maven Resolver's own verbose collection and drops the bundled jar.DependencyTreeFactorycollects the project's dependencies withConflictResolverin verbose mode, using a session from the newMavenEmbedder.newRepositorySession()(settings, mirrors, workspace reader, offline flag).org.netbeans.modules.maven.embedder.tree.DependencyNodeandDependencyNodeVisitor, keeping the part of the old API NetBeans uses, so the 15 classes inmaven,maven.graphandmaven.repositoryonly change imports.INCLUDED; a loser whose winner is an ancestor isOMITTED_FOR_CYCLE; same base version as the winner isOMITTED_FOR_DUPLICATE; otherwiseOMITTED_FOR_CONFLICT, with the winner as related artifact.Behaviour differences:
OMITTED_FOR_CYCLEis effectively never produced.Compatibility:
maven.embeddergoes to 2.90 and no longer exportsorg.apache.maven.shared.dependency.{tree,tree.traversal,graph,graph.filter,graph.traversal}to friends. That is incompatible for any friend module compiling against those packages. None of the external friends inproject.xmluses them: GitHub code search finds no reference in jeddict (jeddict-modeler, jeddict-extensions), sqe-team/sqe, vaadin/netbeans-plugin (archived), NbAppEngine or the netbeans-contrib selenium module.apisupport.installer.mavenandmaven.utilare former NetBeans modules no longer in the tree, andjbi.fuji.supportandandroid.mavenhave no public source. The change is recorded inapichanges.xml.apichanges.xmlnow usesapichanges-1.1.dtd, whose year list already covers 2026.Not tested manually in a running IDE (dependency graph, exclude dependency, create library dialogs).
Verified:
ant -f java/maven.embedder test→ DependencyTreeFactoryTest 5/5 and the existing embedder tests green;ant -f java/maven test→ 418 tests, 0 failures;ant -Dcluster.config=java verify-libs-and-licenses→ 0 failures.Assisted-by: Claude Opus 5.5