You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hudson (Jira)" <ji...@apache.org> on 2022/04/15 15:47:00 UTC
[jira] [Commented] (MNG-6972) Allow access to org.apache.maven.graph
[ https://issues.apache.org/jira/browse/MNG-6972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17522874#comment-17522874 ]
Hudson commented on MNG-6972:
-----------------------------
Build succeeded in Jenkins: Maven » Maven TLP » maven » MNG-7273 #2
See https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/MNG-7273/2/
> Allow access to org.apache.maven.graph
> --------------------------------------
>
> Key: MNG-6972
> URL: https://issues.apache.org/jira/browse/MNG-6972
> Project: Maven
> Issue Type: Improvement
> Components: Class Loading, Plugin API
> Affects Versions: 3.6.3
> Reporter: Michael Kroll
> Assignee: Michael Osipov
> Priority: Major
> Labels: easyfix, pull-request-available
> Fix For: 3.9.0, 4.0.0-alpha-1, 4.0.0
>
>
> 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.
> {code:java}
> // leads to java.lang.NoClassDefFoundError: Lorg/apache/maven/graph/GraphBuilder;
> @Requirement( hint = GraphBuilder.HINT )
> private GraphBuilder graphBuilder;
> {code}
> 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}}.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)