ShrinkWrap Resolver Maven API 2.0.0-alpha-4

org.jboss.shrinkwrap.resolver.api.maven.strategy
Class AcceptScopesStrategy

java.lang.Object
  extended by org.jboss.shrinkwrap.resolver.api.maven.strategy.AcceptScopesStrategy
All Implemented Interfaces:
MavenResolutionStrategy, ResolutionStrategy<MavenDependency,MavenResolutionFilter,MavenResolutionStrategy>

public final class AcceptScopesStrategy
extends Object
implements MavenResolutionStrategy

MavenResolutionStrategy implementation where only MavenDependencys in acceptable ScopeTypes are accepted.

Author:
Karel Piwko, Andrew Lee Rubinger

Constructor Summary
AcceptScopesStrategy(ScopeType... scopes)
          Creates a new instance allowing only the specified ScopeTypes to pass through the getResolutionFilters()
 
Method Summary
 MavenResolutionFilter[] getPreResolutionFilters()
          Returns a MavenResolutionFilter chain allowing all MavenDependencys to pass-through.
 MavenResolutionFilter[] getResolutionFilters()
          Returns a MavenResolutionFilter chain allowing only dependencies in the scopes specified during construction of this instance to pass through
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcceptScopesStrategy

public AcceptScopesStrategy(ScopeType... scopes)
                     throws IllegalArgumentException
Creates a new instance allowing only the specified ScopeTypes to pass through the getResolutionFilters()

Parameters:
scopes - llowed scopes, required
Throws:
IllegalArgumentException - If no scopes are specified
Method Detail

getPreResolutionFilters

public MavenResolutionFilter[] getPreResolutionFilters()
Returns a MavenResolutionFilter chain allowing all MavenDependencys to pass-through.

Specified by:
getPreResolutionFilters in interface MavenResolutionStrategy
Returns:
See Also:
.api.maven.strategy.MavenResolutionStrategy#getPreResolutionFilters()

getResolutionFilters

public MavenResolutionFilter[] getResolutionFilters()
Returns a MavenResolutionFilter chain allowing only dependencies in the scopes specified during construction of this instance to pass through

Specified by:
getResolutionFilters in interface MavenResolutionStrategy
Returns:
See Also:
api.maven.strategy.MavenResolutionStrategy#getResolutionFilter()

ShrinkWrap Resolver Maven API 2.0.0-alpha-4

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