Class MaxDependencyUpdates

java.lang.Object
org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
org.codehaus.mojo.versions.enforcer.MaxDependencyUpdates
All Implemented Interfaces:
org.apache.maven.enforcer.rule.api.EnforcerRuleBase

@Named("maxDependencyUpdates") public class MaxDependencyUpdates extends org.apache.maven.enforcer.rule.api.AbstractEnforcerRule
  • Field Details

    • maxUpdates

      protected int maxUpdates
      Maximum allowed number of updates.
      Since:
      2.14.0
    • processDependencies

      protected boolean processDependencies
      Whether to process the dependencies section of the project.
      Since:
      2.14.0
    • processDependencyManagement

      protected boolean processDependencyManagement
      Whether to process the dependencyManagement section of the project.
      Since:
      1.2
    • processDependencyManagementTransitive

      protected boolean processDependencyManagementTransitive
      Whether to process the dependencyManagement part transitive or not. In case of type pom and scope import, this means by default to report also the imported dependencies. If the parameter is set to false, the report will only show updates of the imported pom itself.
      Since:
      2.14.0
    • processPluginDependencies

      protected boolean processPluginDependencies
      Whether to process the dependencies sections of plugins.
      Since:
      2.14.0
    • processPluginDependenciesInPluginManagement

      protected boolean processPluginDependenciesInPluginManagement
      Whether to process the dependencies sections of plugins which are defined in pluginManagement.
      Since:
      2.14.0
    • ignoreMinorUpdates

      protected boolean ignoreMinorUpdates
      Whether minor updates should be ignored. Default false.

      Note: when true, will also assume that ignoreIncrementalUpdates and ignoreSubIncrementalUpdates are true.

      Since:
      2.14.0
    • ignoreIncrementalUpdates

      protected boolean ignoreIncrementalUpdates
      Whether incremental updates should be ignored. Default false.

      Note: when true, will also assume that ignoreSubIncrementalUpdates is true.

      Since:
      2.14.0
    • ignoreSubIncrementalUpdates

      protected boolean ignoreSubIncrementalUpdates
      Whether sub-incremental updates should be ignored. Default false.
      Since:
      2.14.0
    • dependencyIncludes

      protected List<String> 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

      protected List<String> 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

      protected List<String> 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

      protected List<String> 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

      protected List<String> 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

      protected List<String> 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

      protected List<String> 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

      protected List<String> 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

      protected RuleSet 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 allowSnapshots
      Whether snapshots should be counted as updates. Default is false.
      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 class org.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 interface org.apache.maven.enforcer.rule.api.EnforcerRuleBase
    • getLog

      public org.apache.maven.enforcer.rule.api.EnforcerLogger getLog()