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

WARN if plugins injected by default lifecycle bindings don't have their version locked in pom.xml or parent

    XMLWordPrintableJSON

    Details

      Description

      Currently, when building from a basic pom.xml:

      <project>
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.mycompany.app</groupId>
        <artifactId>my-app</artifactId>
        <version>1.0-SNAPSHOT</version>
      </project>

      many plugins are used, but their version is not locked by the user: the default plugins versions depend on Maven version used, which is not stable over different Maven versions.

      Adding a warning for this stability issue will help users know that they need to lock down plugins versions in their pom (or parent), something like:

      [WARNING] 
      [WARNING] Some problems were encountered while building the effective model for com.mycompany.app:my-app:jar:1.0-SNAPSHOT
      [WARNING] Version not locked for default bindings plugins [maven-install-plugin, maven-resources-plugin, maven-surefire-plugin, maven-compiler-plugin, maven-jar-plugin, maven-deploy-plugin, maven-site-plugin], you should define versions in pluginManagement section of your pom.xml or parent
      [WARNING] 
      [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
      [WARNING] 
      [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                hboutemy Herve Boutemy
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m