ShrinkWrap Resolver Maven API 1.0.0-beta-6

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

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

public class ScopeFilter
extends Object
implements MavenResolutionFilter

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 with no scope defined, that is their scope is an empty string.
ScopeFilter(String... scopes)
          Creates a filter which accepts all artifacts that their scope is one of the specified.
 
Method Summary
 boolean accept(MavenDependency dependency)
           
 MavenResolutionFilter configure(Collection<MavenDependency> dependencies)
           
 
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 with no scope defined, that is their scope is an empty string.


ScopeFilter

public ScopeFilter(String... 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

configure

public MavenResolutionFilter configure(Collection<MavenDependency> dependencies)
Specified by:
configure in interface MavenResolutionFilter

accept

public boolean accept(MavenDependency dependency)
Specified by:
accept in interface DependencyResolutionFilter<MavenResolutionFilter,MavenDependency>
Specified by:
accept in interface MavenResolutionFilter

ShrinkWrap Resolver Maven API 1.0.0-beta-6

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