Skip to content

Commit

Permalink
Removed unused class
Browse files Browse the repository at this point in the history
  • Loading branch information
juulhobert committed Mar 15, 2024
1 parent 9ca40aa commit 67edb68
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -248,36 +248,6 @@ private void writeEffectivePom( MavenProject project, XMLWriter writer )
writer.writeMarkup( effectivePom );
}

private static class DependencyTreeWalker
{
private void visit( DependencyNode node, Stack<String> currentPath, Map<String, List<String>> paths )
{
Artifact artifact = node.getArtifact();
String artifactKey =
ArtifactUtils.key( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion() );

// Add artifact with current traversal path to result
paths.put( artifactKey, new ArrayList<>( currentPath ) );

// Recursively add dependencies of artifact
currentPath.push( artifactKey );

for ( DependencyNode child : node.getChildren() )
{
visit( child, currentPath, paths );
}

currentPath.pop();
}

public Map<String, List<String>> walk( DependencyNode graph )
{
HashMap<String, List<String>> paths = new HashMap<>();
visit( graph, new Stack<String>(), paths );
return paths;
}
}

/**
* Apply some logic to clean the model before writing it.
*
Expand Down

0 comments on commit 67edb68

Please sign in to comment.