Maven Enforcer Plugin
  1. Maven Enforcer Plugin

requirePluginVesions: avoid checking commandline-invoked mojos


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-alpha-4
    • Fix Version/s: 1.0-beta-1
    • Component/s: Standard Rules
    • Labels:
    • Environment:
      Maven 2.0.8, 2.0.9


      Locking plugin versions affects also mojos invoked from commandline, which is typically undesired.
      Besides that, such mojos cannot be even invoked with fully qualified name.

      I am using following configuration in our corporate pom, to enforce that all plugin versions are explicitly declared so that builds are reproducible:

                        <message>ERROR: Please always define plugin versions.</message>

      With this config, I cannot use commandline mojos that are not mentioned with exact version.
      One such case is mvn idea:idea which ends with enforcer failure.
      Even worse: in this case I have no chance to invoke that mojo even with full qualifier - it fails as if I didn't specify version (maybe this part is a bug in different component):

      mvn org.apache.maven.plugins:maven-idea-plugin:2.2:idea

      I can theoretically add something like this to the corporate pom, and it really helps:


      However, this approach is generally unusable, as it requires re-releasing of all modules descending from that pom - which is never desired and rarely possible.

      A semi-solution idea:

      This might be difficult to fix - but if the list of unchecked plugins was somehow externalizable, it would solve my urgent need.
      For instance, add option unCheckedPluginList containing comma separated items - then I can reference a property defined in settings.xml from there.
      That would work for me, because settings are not subject to releasing:


        Issue Links


          Petr Kozelka created issue -
          Brian Fox made changes -
          Field Original Value New Value
          Assignee Brian Fox [ brianfox ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 1.0-beta-1 [ 14948 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 10:06:27 UTC 2015 [ 1428228387238 ]
          Mark Thomas made changes -
          Workflow jira [ 12721205 ] Default workflow, editable Closed status [ 12761790 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 23:50:18 UTC 2015 [ 1428277818417 ]
          Mark Thomas made changes -
          Workflow jira [ 12958839 ] Default workflow, editable Closed status [ 12995789 ]
          Eric Duell made changes -
          Link This issue incorporates MENFORCER-242 [ MENFORCER-242 ]


            • Assignee:
              Brian Fox
              Petr Kozelka
            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created: