I am traversing a dependency graph of my main pom in a plugin using org.apache.maven.shared.dependency.graph.DependencyGraphBuilder.buildDependencyGraph()
and the resulting org.apache.maven.shared.dependency.graph.DependencyNode
However, once I reach a dependency with a specific groupId I need to access a maven property declared in its pom. How can I access the pom via the Artifact or the DependencyNode object?
Let me answer this groovy style .... (using a script written for GMaven)
I'll use as an example Javascript dependencies provided by webjars.org in which I want to read the (unfortunatly optional, as I've just discovered)
requirejs
property.Again, I can't emphasize enough on how the access to
PlexusContainer
saved day, aside the knowledge that theMavenProjectBuilder
component existed somewhere. Notice this component is deprecated and available through maven-compat artifact.