ShrinkWrap Resolver Maven Implementation 2.0.0-alpha-2

org.jboss.shrinkwrap.resolver.impl.maven.filter
Class ScopeFilter

java.lang.Object
  extended by org.jboss.shrinkwrap.resolver.impl.maven.filter.ScopeFilter
All Implemented Interfaces:
MavenResolutionFilter, org.jboss.shrinkwrap.resolver.api.ResolutionFilter<MavenDependency>, MavenResolutionFilterInternalView

public class ScopeFilter
extends Object
implements MavenResolutionFilterInternalView

A filter which limits scope of the artifacts. Only the artifacts within specified scopes are included in resolution.

Author:
Karel Piwko

Constructor Summary
ScopeFilter()
          Creates a filter which accepts all artifacts that have scope {ScopeType.COMPILE
ScopeFilter(ScopeType... scopes)
          Creates a filter which accepts all artifacts that their scope is one of the specified.
 
Method Summary
 boolean accepts(MavenDependency coordinate)
           
 MavenResolutionFilterInternalView setDefinedDependencies(List<MavenDependency> dependencies)
          Sets the MavenDependency elements defined by the user (does not include those obtained via transitive resolution), returning this reference.
 MavenResolutionFilterInternalView setDefinedDependencyManagement(List<MavenDependency> dependencyManagement)
          Sets the MavenDependency elements in dependencyManagement (ie.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScopeFilter

public ScopeFilter()
Creates a filter which accepts all artifacts that have scope {ScopeType.COMPILE


ScopeFilter

public ScopeFilter(ScopeType... scopes)
Creates a filter which accepts all artifacts that their scope is one of the specified.

Parameters:
scopes - The enumeration of allowed scopes
Method Detail

setDefinedDependencies

public MavenResolutionFilterInternalView setDefinedDependencies(List<MavenDependency> dependencies)
Description copied from interface: MavenResolutionFilterInternalView
Sets the MavenDependency elements defined by the user (does not include those obtained via transitive resolution), returning this reference.

Specified by:
setDefinedDependencies in interface MavenResolutionFilterInternalView
Returns:

setDefinedDependencyManagement

public MavenResolutionFilterInternalView setDefinedDependencyManagement(List<MavenDependency> dependencyManagement)
Description copied from interface: MavenResolutionFilterInternalView
Sets the MavenDependency elements in dependencyManagement (ie. versioning metadata) defined by the user, returning this reference.

Specified by:
setDefinedDependencyManagement in interface MavenResolutionFilterInternalView
Returns:

accepts

public boolean accepts(MavenDependency coordinate)
                throws IllegalArgumentException
Specified by:
accepts in interface org.jboss.shrinkwrap.resolver.api.ResolutionFilter<MavenDependency>
Throws:
IllegalArgumentException

ShrinkWrap Resolver Maven Implementation 2.0.0-alpha-2

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