[ https://jira.codehaus.org/browse/MNG-4504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict updated MNG-4504: ------------------------------- Fix Version/s: (was: Issues to be reviewed for 3.x) > Disallowing all aggregator bindings to any lifecycle is too broad > ----------------------------------------------------------------- > > Key: MNG-4504 > URL: https://jira.codehaus.org/browse/MNG-4504 > Project: Maven > Issue Type: Improvement > Components: Plugins and Lifecycle > Affects Versions: 2.2.1 > Environment: Darwin nicerobot.local 9.8.0 Darwin Kernel Version > 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 > i386 > Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400) > Java version: 1.5.0_22 > Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home > Default locale: en, platform encoding: MacRoman > OS name: "mac os x" version: "10.5.8" arch: "i386" Family: "unix" > Reporter: nicerobot > Priority: Minor > > I kinda understand why _some_ aggregators can be dangerous to bind to > lifecycle phases [as mentioned in the > docs|http://www.sonatype.com/books/maven-book/reference/assemblies-sect-basics.html] > but to disallow _all_ aggregator bindings to _any_ lifecycle phase seems to > broad. > For example, [i'm preforming {{scm:checkin}} during > {{install}}|http://stackoverflow.com/questions/1929560/how-can-i-configure-maven-to-commit-to-a-mercurial-repo-when-i-installinstall/1950335#1950335]. > The problem is that i get the warning: > bq. {{DEPRECATED: Binding aggregator mojos to lifecycle phases in the POM is > considered dangerous.}} > Added by [619711|http://svn.apache.org/viewvc?view=revision&revision=619711] > to > [DefaultLifecycleExecutor.java|http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?annotate=619711&diff_format=h&pathrev=619711#l606] > My problem is that this is bound to the +*{{install}}*+ phase so it runs > *after* the {{package}} phase, and according to [the > docs|http://www.sonatype.com/books/maven-book/reference/assemblies-sect-basics.html] > 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: > # be a warning that it's potentially harmful. > # only warn if binding to a phase up to and including package? > # 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. -- This message was sent by Atlassian JIRA (v6.1.6#6162)