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[] |
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[] getResolutionFilters()
MavenResolutionFilter chain allowing only dependencies in the scopes specified during
construction of this instance to pass throughgetResolutionFilters in interface MavenResolutionStrategyMavenResolutionFilter chain to be used in filtering.MavenResolutionStrategy.getResolutionFilters()public TransitiveExclusionPolicy getTransitiveExclusionPolicy()
DefaultTransitiveExclusionPolicy.INSTANCE implementation.getTransitiveExclusionPolicy in interface MavenResolutionStrategyTransitiveExclusionPolicy, never nullMavenResolutionStrategy.getTransitiveExclusionPolicy()Copyright © 2024 JBoss by Red Hat. All rights reserved.