public class BanTransitiveDependencies extends AbstractNonCacheableEnforcerRule implements EnforcerRule
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<java.lang.String> |
excludes
Specify the dependencies that will be ignored.
|
private EnforcerRuleHelper |
helper |
private java.util.List<java.lang.String> |
includes
Specify the dependencies that will be checked.
|
| Constructor and Description |
|---|
BanTransitiveDependencies() |
| Modifier and Type | Method and Description |
|---|---|
private org.apache.maven.shared.dependency.graph.DependencyGraphBuilder |
createDependencyGraphBuilder() |
void |
execute(EnforcerRuleHelper helper)
This is the interface into the rule.
|
private static boolean |
searchTree(org.apache.maven.shared.dependency.graph.DependencyNode node,
int level,
ArtifactMatcher excludes,
java.lang.StringBuilder message)
Searches dependency tree recursively for transitive dependencies that are not excluded, while generating nice
info message along the way.
|
getCacheId, isCacheable, isResultValidgetLevel, getMessage, setLevel, setMessageclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCacheId, isCacheable, isResultValidprivate EnforcerRuleHelper helper
private java.util.List<java.lang.String> excludes
groupId[:artifactId][:version][:type][:scope]. Wildcard '*' can be used to in place of specific
section (ie group:*:1.0 will match both 'group:artifact:1.0' and 'group:anotherArtifact:1.0') private java.util.List<java.lang.String> includes
groupId[:artifactId][:version][:type][:scope]. Wildcard '*' can be used to in place of specific
section (ie group:*:1.0 will match both 'group:artifact:1.0' and 'group:anotherArtifact:1.0') private static boolean searchTree(org.apache.maven.shared.dependency.graph.DependencyNode node,
int level,
ArtifactMatcher excludes,
java.lang.StringBuilder message)
throws org.apache.maven.artifact.versioning.InvalidVersionSpecificationException
org.apache.maven.artifact.versioning.InvalidVersionSpecificationExceptionpublic void execute(EnforcerRuleHelper helper) throws EnforcerRuleException
EnforcerRuleexecute in interface EnforcerRulehelper - The helper provides access to the log, MavenSession and has
helpers to get common components. It is also able to lookup components
by class name.EnforcerRuleException - the enforcer rule exceptionprivate org.apache.maven.shared.dependency.graph.DependencyGraphBuilder createDependencyGraphBuilder()
throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.codehaus.plexus.component.repository.exception.ComponentLookupException