Rio Project 4.2 API Documentation



org.rioproject.resolver
Interface Resolver

All Known Implementing Classes:
ProjectModuleResolver, SimpleResolver

public interface Resolver

Interface for an entity that resolves an artifact. The artifact must be in the form of:

groupId:artifactId[:classifier]:version

The Resolver will also download and install the resolved artifact(s) and their dependencies (including transitive dependencies) if instructed to.


Method Summary
 String[] getClassPathFor(String artifact, File pom, boolean download)
          Get the classpath for an artifact, and resolve (download) the artifact and it's dependencies if needed.
 String[] getClassPathFor(String artifact, RemoteRepository[] repositories, boolean download)
          Get the classpath for an artifact, and resolve (download) the artifact and it's dependencies if needed.
 URL getLocation(String artifact, String artifactType, File pom)
          Get the location of the artifact
 Collection<RemoteRepository> getRemoteRepositories()
          Get the @{link RemoteRepository} instances the Resolver is using
 

Method Detail

getClassPathFor

String[] getClassPathFor(String artifact,
                         File pom,
                         boolean download)
Get the classpath for an artifact, and resolve (download) the artifact and it's dependencies if needed.

Parameters:
artifact - The artifact string.
pom - The artifact pom
download - If true, download and install the resolved elements
Returns:
A string array containing the classpath elements for the artifact

getClassPathFor

String[] getClassPathFor(String artifact,
                         RemoteRepository[] repositories,
                         boolean download)
Get the classpath for an artifact, and resolve (download) the artifact and it's dependencies if needed.

Parameters:
artifact - The artifact string.
repositories - Array of repositories to use to resolve the artifact
download - If true, download and install the resolved elements
Returns:
A string array containing the classpath elements for the artifact

getLocation

URL getLocation(String artifact,
                String artifactType,
                File pom)
Get the location of the artifact

Parameters:
artifact - The artifact string.
artifactType - The type of artifact. Typically either "jar" or "oar". If null (or empty string), "jar" is used. This is used to determine the filename extension of the artifact to locate.
pom - The artifact pom
Returns:
The location of the artifact, or null if not found.

getRemoteRepositories

Collection<RemoteRepository> getRemoteRepositories()
Get the @{link RemoteRepository} instances the Resolver is using

Returns:
The @{link RemoteRepository} instances the Resolver is using. If there are no instances, return an empty collection.

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.