public final class AcceptScopesStrategy extends Object implements MavenResolutionStrategy
MavenResolutionStrategy implementation where only MavenDependencys in acceptable ScopeTypes
are accepted.
Note, this implementation is not able to properly filter scopes defined in a pom.xml file.
See: SHRINKRES-112| Constructor and Description |
|---|
AcceptScopesStrategy(ScopeType... scopes)
Creates a new instance allowing only the specified
ScopeTypes to pass through the
getResolutionFilters() |
| Modifier and Type | Method and Description |
|---|---|
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 |
TransitiveExclusionPolicy |
getTransitiveExclusionPolicy()
Defines how transitive dependencies are filtered during the resolution request.
|
public AcceptScopesStrategy(ScopeType... scopes) throws IllegalArgumentException
ScopeTypes to pass through the
getResolutionFilters()scopes - Allowed scopes, requiredIllegalArgumentException - If no scopes are specifiedpublic MavenResolutionFilter[] getPreResolutionFilters()
MavenResolutionFilter chain allowing all MavenDependencys to pass-through.getPreResolutionFilters in interface MavenResolutionStrategy.api.maven.strategy.MavenResolutionStrategy#getPreResolutionFilters()public MavenResolutionFilter[] getResolutionFilters()
MavenResolutionFilter chain allowing only dependencies in the scopes specified during
construction of this instance to pass throughgetResolutionFilters in interface MavenResolutionStrategyapi.maven.strategy.MavenResolutionStrategy#getResolutionFilter()public TransitiveExclusionPolicy getTransitiveExclusionPolicy()
DefaultTransitiveExclusionPolicy.INSTANCE implementation.getTransitiveExclusionPolicy in interface MavenResolutionStrategyTransitiveExclusionPolicy, never nullMavenResolutionStrategy.getTransitiveExclusionPolicy()Copyright © 2013 JBoss by Red Hat. All Rights Reserved.