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

Disallowing all aggregator bindings to any lifecycle is too broad

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Incomplete
    • 2.2.1
    • None
    • Plugins and Lifecycle
    • None

    Description

      I kinda understand why some aggregators can be dangerous to bind to lifecycle phases as mentioned in the docs but to disallow all aggregator bindings to any lifecycle phase seems to broad.

      For example, i'm preforming scm:checkin during install.

      The problem is that i get the warning:

      DEPRECATED: Binding aggregator mojos to lifecycle phases in the POM is considered dangerous.

      Added by 619711 to DefaultLifecycleExecutor.java

      My problem is that this is bound to the install phase so it runs after the package phase, and according to the docs mentioned above for why it's being disallowed, binding an aggregator, at least scm:checkin, to install doesn't seem "dangerous" at all. At least with Mercurial, scm:checkin doesn't have side-effects that might cause an issue. So, in this case, it should be allowed.

      I think, instead of removing the ability to bind aggregators to lifecycle phases, it should:

      1. be a warning that it's potentially harmful.
      2. only warn if binding to a phase up to and including package?
      3. provide a means to suppress the warning, like, maybe an obvious tag or attribute:
        AllowAggregatorLifeCycleBinding="true"
        which is essentially, use at your own risk, you're on your own if it breaks something.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nicerobot nicerobot
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: