public class ScopeFilter extends Object implements MavenResolutionFilter
| Constructor and Description |
|---|
ScopeFilter()
Creates a filter which accepts all artifacts that have scope {
ScopeType.COMPILE |
ScopeFilter(ScopeType... scopes)
Creates a filter which accepts all artifacts which have scope matching one of those specified here.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(MavenDependency dependency,
List<MavenDependency> dependenciesForResolution,
List<MavenDependency> dependencyAncestors)
Determines whether or not a
MavenDependency is accepted by this filter. |
String |
toString() |
public ScopeFilter()
ScopeType.COMPILEpublic ScopeFilter(ScopeType... scopes)
ScopeType.COMPILE will be allowed as a default.scopes - The enumeration of allowed scopespublic boolean accepts(MavenDependency dependency, List<MavenDependency> dependenciesForResolution, List<MavenDependency> dependencyAncestors)
MavenDependency is accepted by this filter. The filtering mechanism may
consult the project's explicitly-defined dependencies and dependencyManagement (guaranteed immutable
and non-null) in determining whether filtering should be applied.accepts in interface MavenResolutionFilterdependency - Candidate for inclusiondependenciesForResolution - Explicitly-declared dependencies for the current session, does not include those obtained via
transitivitydependencyAncestors - A list of ancestors of the candidate for inclusion.MavenDependency is accepted by this filter.MavenResolutionFilter.accepts(org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenDependency,
java.util.List, java.util.List)Copyright © 2016 JBoss by Red Hat. All rights reserved.