ShrinkWrap Resolver Aggregator 1.1.0-alpha-2

org.jboss.shrinkwrap.resolver.api.maven
Interface MavenDependencyResolverShortcutAPI

All Superinterfaces:
DependencyBuilder<MavenDependencyResolverShortcutAPI>

public interface MavenDependencyResolverShortcutAPI
extends DependencyBuilder<MavenDependencyResolverShortcutAPI>

An artifact builder is object which holds and construct dependencies and it is able to resolve them into an array of ShrinkWrap archives. Artifact builder allows chaining of artifacts, that is specifying a new artifact. In this case, currently constructed artifact is stored as a dependency and user is allowed to specify parameters for another artifact.

Author:
Samuel Santos

Method Summary
<ARCHIVEVIEW extends org.jboss.shrinkwrap.api.Assignable>
ARCHIVEVIEW
resolveArtifactAs(Class<ARCHIVEVIEW> archiveView)
          Resolves dependency for dependency builder.
<ARCHIVEVIEW extends org.jboss.shrinkwrap.api.Assignable>
Collection<ARCHIVEVIEW>
resolveArtifactsAs(Class<ARCHIVEVIEW> archiveView)
          Resolves dependencies for dependency builder.
 Maven.MavenShortcutAPI withPom(String path)
          Loads remote repositories for a POM file.
 
Methods inherited from interface org.jboss.shrinkwrap.resolver.api.DependencyBuilder
artifact, artifacts
 

Method Detail

resolveArtifactAs

<ARCHIVEVIEW extends org.jboss.shrinkwrap.api.Assignable> ARCHIVEVIEW resolveArtifactAs(Class<ARCHIVEVIEW> archiveView)
                                                                          throws ResolutionException
Resolves dependency for dependency builder.

Parameters:
archiveView - End-user view of the archive requested (ie. GenericArchive or JavaArchive)
Returns:
An archive of the resolved artifact.
Throws:
ResolutionException - If artifact could not be resolved
{@link - IllegalArgumentException} If target archive view is not supplied

resolveArtifactsAs

<ARCHIVEVIEW extends org.jboss.shrinkwrap.api.Assignable> Collection<ARCHIVEVIEW> resolveArtifactsAs(Class<ARCHIVEVIEW> archiveView)
                                                                                       throws ResolutionException
Resolves dependencies for dependency builder.

Parameters:
archiveView - End-user view of the archive requested (ie. GenericArchive or JavaArchive)
Returns:
An array of archives which contains resolved artifacts.
Throws:
ResolutionException - If artifacts could not be resolved
{@link - IllegalArgumentException} If target archive view is not supplied

withPom

Maven.MavenShortcutAPI withPom(String path)
Loads remote repositories for a POM file. If repositories are defined in the parent of the POM file and there are accessible via local file system, they are set as well. These remote repositories are used to resolve the artifacts during dependency resolution. Additionally, it loads dependencies defined in the POM file model in an internal cache, which can be later used to resolve an artifact without explicitly specifying its version.

Parameters:
path - A path to the POM file, must not be null or empty
Returns:
A dependency builder with remote repositories set according to the content of POM file.

ShrinkWrap Resolver Aggregator 1.1.0-alpha-2

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.