Uploaded image for project: 'Maven Enforcer Plugin'
  1. Maven Enforcer Plugin
  2. MENFORCER-25

Not actually possible to use the enforce-plugin-versions rule

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Cannot Reproduce
    • 1.0-alpha-3, 1.0
    • None
    • Plugin, Standard Rules
    • None

    Description

      http://maven.apache.org/plugins/maven-enforcer-plugin/rules/requirePluginVersions.html describes how to configure the plugin.

      But by default it won't work, because you have to specify the version of the enforcer plugin itself.

      If you pick 1.0-alpha-3, you get
      [INFO] Failed to configure plugin parameters for: org.apache.maven.plugins:maven-enforcer-plugin:1.0-alpha-3
      Cause: Class 'org.apache.maven.shared.enforcer.rule.api.EnforcerRule' cannot be instantiated

      If you pick 1.0-alpha-4-SNAPSHOT (which would fail the rule anyway, but...), you get
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] org.apache.maven.plugins.enforcer.DefaultEnforcementRuleHelper.<init>(Lorg/apache/maven/execution/MavenSession;Lorg/codehaus/plexus/component/configurator/expression/ExpressionEvaluator;Lorg/apache/maven/plugin/logging/Log;)V
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.NoSuchMethodError: org.apache.maven.plugins.enforcer.DefaultEnforcementRuleHelper.<init>(Lorg/apache/maven/execution/MavenSession;Lorg/codehaus/plexus/component/configurator/expression/ExpressionEvaluator;Lorg/apache/maven/plugin/logging/Log;)V

      Attachments

        Activity

          People

            brianf Brian E Fox
            magnayn nigel magnay
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: