Example usage for org.apache.maven.repository.metadata MetadataTreeNode getChildren

List of usage examples for org.apache.maven.repository.metadata MetadataTreeNode getChildren

Introduction

In this page you can find the example usage for org.apache.maven.repository.metadata MetadataTreeNode getChildren.

Prototype

public MetadataTreeNode[] getChildren() 

Source Link

Usage

From source file:org.ebayopensource.turmeric.eclipse.mavenapi.impl.AbstractMavenApi.java

License:Open Source License

private static void resolveArtifactAsClasspath(final MetadataTreeNode treeNode, final ArtifactScopeEnum scope,
        final Map<String, ArtifactMetadata> metadatas) {
    final ArtifactMetadata md = treeNode.getMd();
    if (metadatas.containsKey(md.toString()) == false && scope.equals(md.getScopeAsEnum())
            && md.getGroupId() != null) {
        metadatas.put(md.toString(), md);
        if (treeNode.getChildren() != null) {
            for (final MetadataTreeNode child : treeNode.getChildren()) {
                resolveArtifactAsClasspath(child, scope, metadatas);
            }/*from ww  w . j av a 2s. c o m*/
        }
    }
}