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

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

Introduction

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

Prototype

public ArtifactMetadata getMd() 

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 a  v  a  2 s.  c o m*/
        }
    }
}