Example usage for org.apache.maven.repository.metadata MetadataResolutionResult setTree

List of usage examples for org.apache.maven.repository.metadata MetadataResolutionResult setTree

Introduction

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

Prototype

public void setTree(MetadataTreeNode root) 

Source Link

Usage

From source file:org.ebayopensource.turmeric.eclipse.mavenapi.internal.util.MavenApiUtil.java

License:Open Source License

/**
 * Tries to resolve a metadata tree based on the given.
 *
 * @param embedder the embedder/*from w ww.j a v  a  2 s .c  o  m*/
 * @param req the req
 * @return the metadata resolution result
 * @throws MavenEclipseApiException the maven eclipse api exception
 * {@code MetadataResolutionRequest} and embed it in a
 * {@code MetadataResolutionResult}.
 */
public static MetadataResolutionResult resolveMetadata(RepositorySystem embedder, MetadataResolutionRequest req)
        throws MavenEclipseApiException {
    MetadataResolutionResult res = new MetadataResolutionResult();
    MetadataTreeNode tree = resolveMetadataTree(embedder, req.getQuery(), null, req.getLocalRepository(),
            req.getRemoteRepositories());
    res.setTree(tree);

    return res;
}