ShrinkWrap Resolver Aggregator 1.1.0-alpha-2

org.jboss.shrinkwrap.resolver.impl.maven
Class MavenImporterImpl

java.lang.Object
  extended by org.jboss.shrinkwrap.resolver.impl.maven.MavenImporterImpl
All Implemented Interfaces:
org.jboss.shrinkwrap.api.Assignable, MavenImporter

public class MavenImporterImpl
extends Object
implements MavenImporter

Basic implementation of MavenImporter. It is able to load settings.xml (optional) and a effective pom.

Author:
Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.shrinkwrap.resolver.api.maven.MavenImporter
MavenImporter.EffectivePomMavenImporter
 
Constructor Summary
MavenImporterImpl(org.jboss.shrinkwrap.api.Archive<?> archive)
          Constructs a MavenImporter based on underlying archive
 
Method Summary
<TYPE extends org.jboss.shrinkwrap.api.Assignable>
TYPE
as(Class<TYPE> archiveType)
           
 MavenImporter configureFrom(String path)
          Configures MavenImporter using setting.xml file.
 MavenImporter.EffectivePomMavenImporter loadEffectivePom(String path, String... profiles)
          Loads effective pom from a given location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MavenImporterImpl

public MavenImporterImpl(org.jboss.shrinkwrap.api.Archive<?> archive)
Constructs a MavenImporter based on underlying archive

Parameters:
archive - the content to be enriched by importer
Method Detail

as

public <TYPE extends org.jboss.shrinkwrap.api.Assignable> TYPE as(Class<TYPE> archiveType)
Specified by:
as in interface org.jboss.shrinkwrap.api.Assignable

configureFrom

public MavenImporter configureFrom(String path)
Description copied from interface: MavenImporter
Configures MavenImporter using setting.xml file.

Specified by:
configureFrom in interface MavenImporter
Parameters:
path - A path to a settings.xml configuration file
Returns:
the MavenImporter with a configuration from given file

loadEffectivePom

public MavenImporter.EffectivePomMavenImporter loadEffectivePom(String path,
                                                                String... profiles)
Description copied from interface: MavenImporter
Loads effective pom from a given location. Profiles are not determined by runtime, so user have to specify all active profile by himself.

Specified by:
loadEffectivePom in interface MavenImporter
Parameters:
path - The path to the effective pom.
profiles - The profiles to be activated
Returns:
MavenImporter which is able to enrich current archive

ShrinkWrap Resolver Aggregator 1.1.0-alpha-2

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