ShrinkWrap Resolver Maven API 2.0.0-alpha-3

org.jboss.shrinkwrap.resolver.api.maven
Class Maven

java.lang.Object
  extended by org.jboss.shrinkwrap.resolver.api.maven.Maven

public class Maven
extends Object

Shorthand convenience API where the call resolver() is analogous to a more longhand, formal call to Resolvers.use(Class), passing MavenResolverSystem as the argument. Also supports configuration via configureResolver().

Author:
Andrew Lee Rubinger

Constructor Summary
Maven()
           
 
Method Summary
static ConfiguredResolverSystemFactory<MavenResolverSystem,ConfigurableMavenResolverSystem> configureResolver()
          Creates and returns a new ConfiguredResolverSystemFactory instance which may be used to create new MavenResolverSystem instances
static PomEquippedResolveStage configureResolverViaPlugin()
          Configures the MavenResolverSystem with settings.xml and POM metadata as picked up from the environment (these properties are set by the ShrinkWrap Maven Resolver Plugin).
static PomEquippedResolveStage configureResolverViaPlugin(ClassLoader cl)
          Configures the MavenResolverSystem with settings.xml and POM metadata as picked up from the environment (these properties are set by the ShrinkWrap Maven Resolver Plugin).
static MavenResolverSystem resolver()
          Creates and returns a new MavenResolverSystem instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Maven

public Maven()
Method Detail

resolver

public static MavenResolverSystem resolver()
Creates and returns a new MavenResolverSystem instance

Returns:

configureResolver

public static ConfiguredResolverSystemFactory<MavenResolverSystem,ConfigurableMavenResolverSystem> configureResolver()
Creates and returns a new ConfiguredResolverSystemFactory instance which may be used to create new MavenResolverSystem instances

Returns:

configureResolverViaPlugin

public static PomEquippedResolveStage configureResolverViaPlugin()
                                                          throws InvalidEnvironmentException
Configures the MavenResolverSystem with settings.xml and POM metadata as picked up from the environment (these properties are set by the ShrinkWrap Maven Resolver Plugin). The new instance will be created by the current Thread.getContextClassLoader().

Returns:
Throws:
InvalidEnvironmentException - If this is executed outside the context of the ShrinkWrap Maven Resolver Plugin Environment

configureResolverViaPlugin

public static PomEquippedResolveStage configureResolverViaPlugin(ClassLoader cl)
                                                          throws InvalidEnvironmentException,
                                                                 IllegalArgumentException
Configures the MavenResolverSystem with settings.xml and POM metadata as picked up from the environment (these properties are set by the ShrinkWrap Maven Resolver Plugin).

Parameters:
cl - The ClassLoader used to create the new instance; required
Returns:
Throws:
IllegalArgumentException - If the ClassLoader is not specified
InvalidEnvironmentException - If this is executed outside the context of the ShrinkWrap Maven Resolver Plugin Environment

ShrinkWrap Resolver Maven API 2.0.0-alpha-3

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