Class MaxDependencyUpdates
- All Implemented Interfaces:
org.apache.maven.enforcer.rule.api.EnforcerRuleBase
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Whether snapshots should be counted as updates.List of input dependency exclusion patterns.List of input dependency inclusion patterns.List of dependency management exclusion patterns.List of dependency management inclusion patterns.protected boolean
Whether incremental updates should be ignored.protected boolean
Whether minor updates should be ignored.protected boolean
Whether sub-incremental updates should be ignored.protected int
Maximum allowed number of updates.List of plugin dependency exclusion patterns.List of plugin dependency inclusion patterns.List of plugin dependency management exclusion patterns.List of plugin management dependency inclusion patterns.protected boolean
Whether to process the dependencies section of the project.protected boolean
Whether to process the dependencyManagement section of the project.protected boolean
Whether to process the dependencyManagement part transitive or not.protected boolean
Whether to process the dependencies sections of plugins.protected boolean
Whether to process the dependencies sections of plugins which are defined in pluginManagement.protected RuleSet
Allows specifying the RuleSet object describing rules on artifact versions to ignore when considering updates. -
Constructor Summary
ConstructorsConstructorDescriptionMaxDependencyUpdates
(org.apache.maven.project.MavenProject project, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, org.eclipse.aether.RepositorySystem repositorySystem, Map<String, org.apache.maven.wagon.Wagon> wagonMap, org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.plugin.MojoExecution mojoExecution) -
Method Summary
Methods inherited from class org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
getCacheId, getLevel
-
Field Details
-
maxUpdates
protected int maxUpdatesMaximum allowed number of updates.- Since:
- 2.14.0
-
processDependencies
protected boolean processDependenciesWhether to process the dependencies section of the project.- Since:
- 2.14.0
-
processDependencyManagement
protected boolean processDependencyManagementWhether to process the dependencyManagement section of the project.- Since:
- 1.2
-
processDependencyManagementTransitive
protected boolean processDependencyManagementTransitiveWhether to process the dependencyManagement part transitive or not. In case of typepom
and scopeimport
, this means by default to report also the imported dependencies. If the parameter is set tofalse
, the report will only show updates of the imported pom itself.- Since:
- 2.14.0
-
processPluginDependencies
protected boolean processPluginDependenciesWhether to process the dependencies sections of plugins.- Since:
- 2.14.0
-
processPluginDependenciesInPluginManagement
protected boolean processPluginDependenciesInPluginManagementWhether to process the dependencies sections of plugins which are defined in pluginManagement.- Since:
- 2.14.0
-
ignoreMinorUpdates
protected boolean ignoreMinorUpdatesWhether minor updates should be ignored. Defaultfalse
.Note: when
true
, will also assume thatignoreIncrementalUpdates
andignoreSubIncrementalUpdates
aretrue
.- Since:
- 2.14.0
-
ignoreIncrementalUpdates
protected boolean ignoreIncrementalUpdatesWhether incremental updates should be ignored. Defaultfalse
.Note: when
true
, will also assume thatignoreSubIncrementalUpdates
istrue
.- Since:
- 2.14.0
-
ignoreSubIncrementalUpdates
protected boolean ignoreSubIncrementalUpdatesWhether sub-incremental updates should be ignored. Defaultfalse
.- Since:
- 2.14.0
-
dependencyIncludes
List of input dependency inclusion patterns.
Note: even if a version is specified, it will refer to the input dependency version. To filter output versions, please use
ruleSet
.Only dependencies matching all the patterns will be considered. The wildcard "*" can be used as the only, first, last or both characters in each token. The version token does support version ranges.
- Since:
- 2.14.0
-
dependencyExcludes
List of input dependency exclusion patterns.
Note: even if a version is specified, it will refer to the input dependency version. To filter output versions, please use
ruleSet
.Only dependencies matching none of the patterns will be considered. The wildcard "*" can be used as the only, first, last or both characters in each token. The version token does support version ranges.
- Since:
- 2.14.0
-
dependencyManagementIncludes
List of dependency management inclusion patterns. Only dependencies matching all the patterns will be considered. The wildcard "*" can be used as the only, first, last or both characters in each token. The version token does support version ranges.- Since:
- 2.14.0
-
dependencyManagementExcludes
List of dependency management exclusion patterns. Only dependencies matching none of the patterns will be considered. The wildcard "*" can be used as the only, first, last or both characters in each token. The version token does support version ranges.- Since:
- 2.14.0
-
pluginDependencyIncludes
List of plugin dependency inclusion patterns. Only dependencies matching all the patterns will be considered. The wildcard "*" can be used as the only, first, last or both characters in each token. The version token does support version ranges.- Since:
- 2.14.0
-
pluginDependencyExcludes
List of plugin dependency exclusion patterns. Only dependencies matching none of the patterns will be considered. The wildcard "*" can be used as the only, first, last or both characters in each token. The version token does support version ranges.- Since:
- 2.14.0
-
pluginManagementDependencyIncludes
List of plugin management dependency inclusion patterns. Only dependencies matching all the patterns will be considered. The wildcard "*" can be used as the only, first, last or both characters in each token. The version token does support version ranges.- Since:
- 2.14.0
-
pluginManagementDependencyExcludes
List of plugin dependency management exclusion patterns. Only dependencies matching none of the patterns will be considered. The wildcard "*" can be used as the only, first, last or both characters in each token. The version token does support version ranges.- Since:
- 2.14.0
-
ruleSet
Allows specifying the RuleSet object describing rules on artifact versions to ignore when considering updates.
- Since:
- 2.14.0
- See Also:
-
allowSnapshots
protected boolean allowSnapshotsWhether snapshots should be counted as updates. Default isfalse
.- Since:
- 2.14.2
-
-
Constructor Details
-
MaxDependencyUpdates
@Inject public MaxDependencyUpdates(org.apache.maven.project.MavenProject project, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, org.eclipse.aether.RepositorySystem repositorySystem, Map<String, org.apache.maven.wagon.Wagon> wagonMap, org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.plugin.MojoExecution mojoExecution)
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.enforcer.rule.api.EnforcerRuleException- Specified by:
execute
in classorg.apache.maven.enforcer.rule.api.AbstractEnforcerRule
- Throws:
org.apache.maven.enforcer.rule.api.EnforcerRuleException
-
setLog
public void setLog(org.apache.maven.enforcer.rule.api.EnforcerLogger arg0) - Specified by:
setLog
in interfaceorg.apache.maven.enforcer.rule.api.EnforcerRuleBase
-
getLog
public org.apache.maven.enforcer.rule.api.EnforcerLogger getLog()
-