public final class AcceptScopesStrategy extends Object implements MavenResolutionStrategy
MavenResolutionStrategy
implementation where only MavenDependency
s in acceptable ScopeType
s
are accepted.
Note, this implementation is not able to properly filter scopes defined in a pom.xml file.
See: SHRINKRES-112Constructor and Description |
---|
AcceptScopesStrategy(ScopeType... scopes)
Creates a new instance allowing only the specified
ScopeType s to pass through the
getResolutionFilters() |
Modifier and Type | Method and Description |
---|---|
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
ScopeType
s to pass through the
getResolutionFilters()
scopes
- Allowed scopes, requiredIllegalArgumentException
- If no scopes are specifiedpublic MavenResolutionFilter[] getResolutionFilters()
MavenResolutionFilter
chain allowing only dependencies in the scopes specified during
construction of this instance to pass throughgetResolutionFilters
in interface MavenResolutionStrategy
MavenResolutionFilter
chain to be used in filtering.MavenResolutionStrategy.getResolutionFilters()
public TransitiveExclusionPolicy getTransitiveExclusionPolicy()
DefaultTransitiveExclusionPolicy.INSTANCE
implementation.getTransitiveExclusionPolicy
in interface MavenResolutionStrategy
TransitiveExclusionPolicy
, never nullMavenResolutionStrategy.getTransitiveExclusionPolicy()
Copyright © 2021 JBoss by Red Hat. All rights reserved.