public class RejectDependenciesStrategy extends Object implements MavenResolutionStrategy
MavenResolutionStrategy
implementation where specified MavenDependency
s may be selectively rejectedConstructor and Description |
---|
RejectDependenciesStrategy(boolean rejectTransitives,
String... coordinates)
Bans all dependencies specified by coordinates possibly including all transitive dependencies that might be fetched by
resolving coordinates.
|
RejectDependenciesStrategy(String... coordinates)
Bans all dependencies specified by coordinates including all transitive dependencies that might be fetched by resolving
coordinates.
|
Modifier and Type | Method and Description |
---|---|
MavenResolutionFilter[] |
getResolutionFilters()
Returns a
MavenResolutionFilter chain blocking MavenDependency s with coordinates supplied at
instance construction |
TransitiveExclusionPolicy |
getTransitiveExclusionPolicy()
Defines how transitive dependencies are filtered during the resolution request.
|
public RejectDependenciesStrategy(String... coordinates) throws IllegalArgumentException, CoordinateParseException
coordinates
- Coordinates to be bannedIllegalArgumentException
- If no coordinates are specifiedCoordinateParseException
- If coordinates does not follow required formatpublic RejectDependenciesStrategy(boolean rejectTransitives, String... coordinates) throws IllegalArgumentException, CoordinateParseException
rejectTransitives
- Flag to allow rejecting transitive dependencies of specified coordinatescoordinates
- Coordinates to be bannedIllegalArgumentException
- If no coordinates are specifiedCoordinateParseException
- If coordinates does not follow required formatpublic MavenResolutionFilter[] getResolutionFilters()
MavenResolutionFilter
chain blocking MavenDependency
s with coordinates supplied at
instance constructiongetResolutionFilters
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.