Example usage for org.apache.maven.repository.metadata ArtifactMetadata toString

List of usage examples for org.apache.maven.repository.metadata ArtifactMetadata toString

Introduction

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

Prototype

@Override
    public String toString() 

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 w  w  w  .j  ava  2s. co m
        }
    }
}

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

License:Open Source License

/**
 * Gets the all project artifact ids in workspace.
 *
 * @return the all project artifact ids in workspace
 *//*from   w  w  w .  j  a v  a 2s  .  c o m*/
public static Map<String, IProject> getAllProjectArtifactIdsInWorkspace() {
    final Map<String, IProject> projects = new ConcurrentHashMap<String, IProject>();
    final Map<ArtifactMetadata, IProject> map = getAllProjectArtifactsInWorkspace();
    for (final ArtifactMetadata metadata : map.keySet()) {
        if (metadata == null)
            continue;
        projects.put(metadata.toString(), map.get(metadata));
    }
    return projects;
}