slachiewicz opened a new pull request, #9694:
URL: https://github.com/apache/netbeans/pull/9694

   `DependencyTreeFactory` still built trees with maven-dependency-tree 2.2 
(2014), whose `DependencyTreeBuilder` goes through maven-compat's legacy 
`ArtifactCollector` — the `TODO: check alternative for deprecated maven 
components` in that class. This replaces it with Maven Resolver's own verbose 
collection and drops the bundled jar.
   
   - `DependencyTreeFactory` collects the project's dependencies with 
`ConflictResolver` in verbose mode, using a session from the new 
`MavenEmbedder.newRepositorySession()` (settings, mirrors, workspace reader, 
offline flag).
   - The result is a NetBeans-owned 
`org.netbeans.modules.maven.embedder.tree.DependencyNode` and 
`DependencyNodeVisitor`, keeping the part of the old API NetBeans uses, so the 
15 classes in `maven`, `maven.graph` and `maven.repository` only change imports.
   - Mapping: winners are `INCLUDED`; a loser whose winner is an ancestor is 
`OMITTED_FOR_CYCLE`; same base version as the winner is 
`OMITTED_FOR_DUPLICATE`; otherwise `OMITTED_FOR_CONFLICT`, with the winner as 
related artifact.
   
   Behaviour differences:
   - Resolver removes cycle losers even in verbose mode, so `OMITTED_FOR_CYCLE` 
is effectively never produced.
   - The scope filter now prunes subtrees; the old builder accepted a filter 
but never applied it.
   - Nodes use identity equality, so lookups no longer break when a node's hash 
changes after mutation.
   
   Compatibility: `maven.embedder` goes to 2.90 and no longer exports 
`org.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; I have not checked the external friends listed in `project.xml`. The 
change is recorded in `apichanges.xml`.
   
   Depends on #9693 (the `apichanges.dtd` year list rejects the 2026 entry); 
its commit is included here and drops out once #9693 is merged.
   
   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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to