Skip to content

[MNG-6972] Allow access to org.apache.maven.graph #8062

@jira-importer

Description

@jira-importer

Michael Kroll opened MNG-6972 and commented

Hi

maven doesn't export org.apache.maven.graph package in maven-core/src/main/resources/META-INF/maven/extension.xml so the GraphBuilder is not usable in extensions.

// leads to java.lang.NoClassDefFoundError: Lorg/apache/maven/graph/GraphBuilder;
@Requirement( hint = GraphBuilder.HINT )
private GraphBuilder graphBuilder;

Background: if one build extension adds dependencies and another build extension uses session.getProjectDependencyGraph(), then the dependency graph is out of date. This is because the graph is only rebuilt after executing all extensions. One solution to this would be to update the MavenSession and setting the new dependency graph in the first extension, but for this we need access to the GraphBuilder.


Affects: 3.6.3

Issue Links:

Remote Links:

Backported to: 4.0.0-alpha-2, 3.9.0, 3.8.8

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions