Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3358

Require explicit plugin versions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Plugins and Lifecycle
    • None

    Description

      Currently plugin versions are not required in the pom which causes maven to use the latest version of each plugin to be used when building a project. The problem with this system is that builds can break (without any change to the project itself) if a new version of a plugin is released. This can cause confusion among developers because the build appears to break for no reason. It also makes reproducing old builds to be more difficult because a newer version of a plugin could cause some aspect of the build to be different than when it was originally released.

      SUREFIRE-61 is one example of where this happened. When surefire 2.3.1 was released, it affected the testing of some builds because the classpath ordering changed.

      My suggestion for fixing this is to require a version for all plugins. This is already a best practice among many maven users, but it is not enforced by maven itself. For the default lifecycle plugins (compiler plugin, surefire plugin, etc.) maven should tie it's version to specific default versions of the plugins. These could then be overridden when necessary.

      This change probably belongs in 2.1 since it is too big a change for 2.0.9.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pgier Paul Gier
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: