ShrinkWrap Resolver Maven API 2.0.0-alpha-1

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

All Known Subinterfaces:
MavenDependencyShortcut

public interface EffectivePomMavenDependencyShortcut

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:
Karel Piwko, Samuel Santos

Method Summary
 Collection<org.jboss.shrinkwrap.api.GenericArchive> dependencies(String... coordinates)
          Resolves dependencies for dependency builder.
 org.jboss.shrinkwrap.api.GenericArchive dependency(String coordinates)
          Resolves dependency for dependency builder.
 File resolveAsFile(String coordinates)
          Resolves dependency for dependency builder.
 File[] resolveAsFiles(String... coordinates)
          Resolves dependencies for dependency builder.
 

Method Detail

dependency

org.jboss.shrinkwrap.api.GenericArchive dependency(String coordinates)
                                                   throws ResolutionException
Resolves dependency for dependency builder.

Parameters:
coordinates - the string representing a dependency
Returns:
An archive of the resolved artifact.
Throws:
ResolutionException - If artifact could not be resolved
{@link - IllegalArgumentException} If coordinates are not supplied

dependencies

Collection<org.jboss.shrinkwrap.api.GenericArchive> dependencies(String... coordinates)
                                                                 throws ResolutionException
Resolves dependencies for dependency builder.

Parameters:
coordinates - a list of strings representing dependencies
Returns:
An array of archives which contains resolved artifacts.
Throws:
ResolutionException - If artifacts could not be resolved
{@link - IllegalArgumentException} If coordinates are not supplied

resolveAsFile

File resolveAsFile(String coordinates)
                   throws ResolutionException
Resolves dependency for dependency builder.

Parameters:
coordinates - Coordinates specified to a created artifact, specified in an implementation-specific format.
Returns:
A File which contain resolved artifact.
Throws:
ResolutionException - If artifact could not be resolved

resolveAsFiles

File[] resolveAsFiles(String... coordinates)
                      throws ResolutionException
Resolves dependencies for dependency builder.

Parameters:
coordinates - A list of coordinates specified to the created artifacts, specified in an implementation-specific format.
Returns:
An array of Files which contains resolved artifacts
Throws:
ResolutionException - If artifact could not be resolved

ShrinkWrap Resolver Maven API 2.0.0-alpha-1

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.