Class RequireUpperBoundDeps
java.lang.Object
org.apache.maven.enforcer.rule.api.AbstractEnforcerRuleBase
org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
org.apache.maven.enforcer.rules.AbstractStandardEnforcerRule
org.apache.maven.enforcer.rules.dependency.RequireUpperBoundDeps
- All Implemented Interfaces:
EnforcerRuleBase
@Named("requireUpperBoundDeps")
public final class RequireUpperBoundDeps
extends AbstractStandardEnforcerRule
Rule to enforce that the resolved dependency is also the most recent one of all transitive dependencies.
- Since:
- 1.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionScope to exclude.Dependencies to ignore.Dependencies to include.private final ResolverUtilprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringbuildErrorMessage(List<org.eclipse.aether.graph.DependencyNode> conflict) buildErrorMessages(List<List<org.eclipse.aether.graph.DependencyNode>> conflicts) private StringBuilderbuildTreeString(org.eclipse.aether.graph.DependencyNode node) voidexecute()This is the interface into the rule.private StringgetFullArtifactName(org.eclipse.aether.graph.DependencyNode node, boolean usePremanaged) voidsetExcludes(List<String> excludes) Sets dependencies to exclude.voidsetIncludes(List<String> includes) Sets dependencies to include.Methods inherited from class AbstractStandardEnforcerRule
formatLocation, getMessage, setMessageMethods inherited from class AbstractEnforcerRule
getCacheId, getLevel, getRuleNameMethods inherited from class AbstractEnforcerRuleBase
getLog, setLog
-
Field Details
-
uniqueVersions
private boolean uniqueVersions- Since:
- 1.3
-
excludes
-
includes
-
excludedScopes
-
upperBoundDepsVisitor
-
resolverUtil
-
-
Constructor Details
-
RequireUpperBoundDeps
-
-
Method Details
-
setExcludes
-
setIncludes
-
execute
Description copied from class:AbstractEnforcerRuleThis is the interface into the rule. This method should throw an exception containing a reason message if the rule fails the check. The plugin will then decide based on the fail flag and rule level if it should stop or just log the message as a warning.- Specified by:
executein classAbstractEnforcerRule- Throws:
EnforcerRuleException- the enforcer rule exception
-
buildErrorMessages
-
buildErrorMessage
-
buildTreeString
-
getFullArtifactName
private String getFullArtifactName(org.eclipse.aether.graph.DependencyNode node, boolean usePremanaged)
-