Re: Dynamic phases proposal
I have a question to the old phases in CLI. I will use the phase "post-site" in my examples. $ mvn post-site What did we expect from "post-site" and why we supported it in CLI? >From my point of view, it is a bad use. I used it as well because I expected Maven to run "post-site" after $ mvn site Since my POM complicated and neede to perform some postprocessing of the project page (Site), I used "post-site" in my plugins in my POM. Due to the "post-site" was not triggered after "site" by the Maven ($ mvn site), I had to force the whole lifecycle to run the build until the end, means "post-site". I was not in Maven 15 years ago, but I think the "post-???" phases were dedicated to POM and not in CLI. The thing that Maven works as it works, I considered the behavior as a bug but I could not do anything about it and tried to workaround it in CLI. So, altogether including this new feature means that we can frely remove all post phases from CLI because they will run anyway when the main phases are used in CLI. On Sat, Oct 26, 2019 at 12:13 AM Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > On Fri 25 Oct 2019 at 22:48, Tamás Cservenák wrote: > > > I am referring to this sentence: > > "The logic of using : in these prefix names is that it would expressly > be > > impossible to invoke these dynamic pseudo phases from the CLI as Maven > will > > interpret any attempt to invoke them as $plugin:$goal and look for a > > maven-before-plugin or maven-after-plugin". > > > > We can put specific checks in to give friendly error messages, but > fundamentally Maven will treat a CLI argument with one colon as a plugin > goal to execute separate from the lifecycle > > We want the before and after phases to not be directly invoked via CLI or > invoker, and because you cannot have a phase with this name, it’s safe to > reuse > > > > > > > > On Fri, Oct 25, 2019 at 11:13 PM Stephen Connolly < > > stephen.alan.conno...@gmail.com> wrote: > > > > > On Fri 25 Oct 2019 at 21:41, Tamás Cservenák > > wrote: > > > > > > > The fixed phases were one of the main strengths of Maven, and with > this > > > > automatism it could really be enhanced. > > > > > > > > My dislike: the `before:goal` invocation is being "projected" to non > > > > existent plugin invocation. This sounds like a hack. Could we clear > > that > > > > part up? > > > > > > > > > Could you explain what you mean? I’m not seeing what you are saying > > > > > > > > > > > > > > T > > > > > > > > On Fri, Oct 25, 2019 at 10:23 PM Emmanuel Bourg > > > wrote: > > > > > > > > > Le 25/10/2019 à 21:01, Stephen Connolly a écrit : > > > > > > https://cwiki.apache.org/confluence/display/MAVEN/Dynamic+phases > > > > > > > > > > > > Thoughts? > > > > > > > > > > Sounds interesting. You may want to forbid the before/after prefix > on > > > > > the deprecated phases (such as after:pre-clean). > > > > > > > > > > The name of the phases use to start with a verb, that would no > longer > > > be > > > > > true with the proposed 'sources' and 'resources' phases. Since it > > isn't > > > > > that common to invoke these phases directly from the command line > > maybe > > > > > the longer name could be retained to preserve the consistency > > > > > (generate-sources, etc). > > > > > > > > > > Emmanuel Bourg > > > > > > > > > > > - > > > > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > > > > > For additional commands, e-mail: dev-h...@maven.apache.org > > > > > > > > > > > > > > > > > -- > > > Sent from my phone > > > > > > -- > Sent from my phone >
Re: Dynamic phases proposal
On Fri 25 Oct 2019 at 22:48, Tamás Cservenák wrote: > I am referring to this sentence: > "The logic of using : in these prefix names is that it would expressly be > impossible to invoke these dynamic pseudo phases from the CLI as Maven will > interpret any attempt to invoke them as $plugin:$goal and look for a > maven-before-plugin or maven-after-plugin". > We can put specific checks in to give friendly error messages, but fundamentally Maven will treat a CLI argument with one colon as a plugin goal to execute separate from the lifecycle We want the before and after phases to not be directly invoked via CLI or invoker, and because you cannot have a phase with this name, it’s safe to reuse > > > On Fri, Oct 25, 2019 at 11:13 PM Stephen Connolly < > stephen.alan.conno...@gmail.com> wrote: > > > On Fri 25 Oct 2019 at 21:41, Tamás Cservenák > wrote: > > > > > The fixed phases were one of the main strengths of Maven, and with this > > > automatism it could really be enhanced. > > > > > > My dislike: the `before:goal` invocation is being "projected" to non > > > existent plugin invocation. This sounds like a hack. Could we clear > that > > > part up? > > > > > > Could you explain what you mean? I’m not seeing what you are saying > > > > > > > > > > T > > > > > > On Fri, Oct 25, 2019 at 10:23 PM Emmanuel Bourg > > wrote: > > > > > > > Le 25/10/2019 à 21:01, Stephen Connolly a écrit : > > > > > https://cwiki.apache.org/confluence/display/MAVEN/Dynamic+phases > > > > > > > > > > Thoughts? > > > > > > > > Sounds interesting. You may want to forbid the before/after prefix on > > > > the deprecated phases (such as after:pre-clean). > > > > > > > > The name of the phases use to start with a verb, that would no longer > > be > > > > true with the proposed 'sources' and 'resources' phases. Since it > isn't > > > > that common to invoke these phases directly from the command line > maybe > > > > the longer name could be retained to preserve the consistency > > > > (generate-sources, etc). > > > > > > > > Emmanuel Bourg > > > > > > > > - > > > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > > > > For additional commands, e-mail: dev-h...@maven.apache.org > > > > > > > > > > > > > -- > > Sent from my phone > > > -- Sent from my phone
Re: Dynamic phases proposal
I am referring to this sentence: "The logic of using : in these prefix names is that it would expressly be impossible to invoke these dynamic pseudo phases from the CLI as Maven will interpret any attempt to invoke them as $plugin:$goal and look for a maven-before-plugin or maven-after-plugin". On Fri, Oct 25, 2019 at 11:13 PM Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > On Fri 25 Oct 2019 at 21:41, Tamás Cservenák wrote: > > > The fixed phases were one of the main strengths of Maven, and with this > > automatism it could really be enhanced. > > > > My dislike: the `before:goal` invocation is being "projected" to non > > existent plugin invocation. This sounds like a hack. Could we clear that > > part up? > > > Could you explain what you mean? I’m not seeing what you are saying > > > > > > T > > > > On Fri, Oct 25, 2019 at 10:23 PM Emmanuel Bourg > wrote: > > > > > Le 25/10/2019 à 21:01, Stephen Connolly a écrit : > > > > https://cwiki.apache.org/confluence/display/MAVEN/Dynamic+phases > > > > > > > > Thoughts? > > > > > > Sounds interesting. You may want to forbid the before/after prefix on > > > the deprecated phases (such as after:pre-clean). > > > > > > The name of the phases use to start with a verb, that would no longer > be > > > true with the proposed 'sources' and 'resources' phases. Since it isn't > > > that common to invoke these phases directly from the command line maybe > > > the longer name could be retained to preserve the consistency > > > (generate-sources, etc). > > > > > > Emmanuel Bourg > > > > > > - > > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > > > For additional commands, e-mail: dev-h...@maven.apache.org > > > > > > > > > -- > Sent from my phone >
Re: Dynamic phases proposal
On Fri 25 Oct 2019 at 21:41, Tamás Cservenák wrote: > The fixed phases were one of the main strengths of Maven, and with this > automatism it could really be enhanced. > > My dislike: the `before:goal` invocation is being "projected" to non > existent plugin invocation. This sounds like a hack. Could we clear that > part up? Could you explain what you mean? I’m not seeing what you are saying > > T > > On Fri, Oct 25, 2019 at 10:23 PM Emmanuel Bourg wrote: > > > Le 25/10/2019 à 21:01, Stephen Connolly a écrit : > > > https://cwiki.apache.org/confluence/display/MAVEN/Dynamic+phases > > > > > > Thoughts? > > > > Sounds interesting. You may want to forbid the before/after prefix on > > the deprecated phases (such as after:pre-clean). > > > > The name of the phases use to start with a verb, that would no longer be > > true with the proposed 'sources' and 'resources' phases. Since it isn't > > that common to invoke these phases directly from the command line maybe > > the longer name could be retained to preserve the consistency > > (generate-sources, etc). > > > > Emmanuel Bourg > > > > - > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > > For additional commands, e-mail: dev-h...@maven.apache.org > > > > > -- Sent from my phone
Re: Hard requirements
On Tue 22 Oct 2019 at 11:30, Elliotte Rusty Harold wrote: > The docs at > https://maven.apache.org/pom.html#Dependency_Version_Requirement_Specification > say: > > 1.0: "Soft" requirement on 1.0 (just a recommendation, if it matches > all other ranges for the dependency) > [1.0]: "Hard" requirement on 1.0 > > However, I don't think anywhere do we actually explain what a soft or > a "Hard" requirement is. If someone can clarify this for me, I'll > update the docs accordingly. > Ranges only come into affect when you have multiple dependencies using ranges. When you use ranges, Maven tries to satisfy all the requests. A soft version is like: “I’d like this if I can have it” A hard version is: “only this or die” If your dependency tree has dependency foo being brought in by multiple dependencies: Maven first gets the intersection of all ranges If there is more than one version left in the intersection, Maven looks at the “nearest” soft version requests and if that fits the range it will use that. If your range is just a single version, that means only that version will do, hence it becomes a hard specification. Now having said all that, ranges have - to date - proven problematic. In general it is better to avoid ranges at all... and that includes hard version numbers. Hopefully in Maven 5.0.0 we can find a way to make ranges at least usable... but the reality is ranges are a hard problem in and if themselves. > > > -- > Elliotte Rusty Harold > elh...@ibiblio.org > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > > -- Sent from my phone
Re: Dynamic phases proposal
The fixed phases were one of the main strengths of Maven, and with this automatism it could really be enhanced. My dislike: the `before:goal` invocation is being "projected" to non existent plugin invocation. This sounds like a hack. Could we clear that part up? T On Fri, Oct 25, 2019 at 10:23 PM Emmanuel Bourg wrote: > Le 25/10/2019 à 21:01, Stephen Connolly a écrit : > > https://cwiki.apache.org/confluence/display/MAVEN/Dynamic+phases > > > > Thoughts? > > Sounds interesting. You may want to forbid the before/after prefix on > the deprecated phases (such as after:pre-clean). > > The name of the phases use to start with a verb, that would no longer be > true with the proposed 'sources' and 'resources' phases. Since it isn't > that common to invoke these phases directly from the command line maybe > the longer name could be retained to preserve the consistency > (generate-sources, etc). > > Emmanuel Bourg > > - > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >
Re: Dynamic phases proposal
Le 25/10/2019 à 21:01, Stephen Connolly a écrit : > https://cwiki.apache.org/confluence/display/MAVEN/Dynamic+phases > > Thoughts? Sounds interesting. You may want to forbid the before/after prefix on the deprecated phases (such as after:pre-clean). The name of the phases use to start with a verb, that would no longer be true with the proposed 'sources' and 'resources' phases. Since it isn't that common to invoke these phases directly from the command line maybe the longer name could be retained to preserve the consistency (generate-sources, etc). Emmanuel Bourg - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Dynamic phases proposal
I like package[2000] because it solves my problems when I had to order plugins to reach exactly this feature. Even impossible to do it if plugins use different phases, then ordering of plugins would not help. The syntax package[2000] will solve this! On Fri, Oct 25, 2019 at 9:36 PM Romain Manni-Bucau wrote: > Hi Stephen, > > I like the priority a lot and shortcut syntax - not having - > sounds a good compromise on user side (inline is always appreciated) and > impl side (no model change). > > Romain > > Le ven. 25 oct. 2019 à 21:02, Stephen Connolly < > stephen.alan.conno...@gmail.com> a écrit : > > > https://cwiki.apache.org/confluence/display/MAVEN/Dynamic+phases > > > > Thoughts? > > -- > > Sent from my phone > > >
Re: Dynamic phases proposal
Hi Stephen, I like the priority a lot and shortcut syntax - not having - sounds a good compromise on user side (inline is always appreciated) and impl side (no model change). Romain Le ven. 25 oct. 2019 à 21:02, Stephen Connolly < stephen.alan.conno...@gmail.com> a écrit : > https://cwiki.apache.org/confluence/display/MAVEN/Dynamic+phases > > Thoughts? > -- > Sent from my phone >
Re: Dynamic phases proposal
Robert, I would be fine splitting out into, pardon the pun, phases: Phase 1: before and after Phase 2: priorities Phase 3: transitional lifecycle Might have a phase 1.5 of before:* and after:* to catch the start of a lifecycle and the end of a lifecycle... On Fri 25 Oct 2019 at 20:30, Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > Robert, Michael, Tibor, let’s continue here (though I asked Infra and it’s > fine that anyone in the community can join our Slack) > > On Fri 25 Oct 2019 at 20:01, Stephen Connolly < > stephen.alan.conno...@gmail.com> wrote: > >> https://cwiki.apache.org/confluence/display/MAVEN/Dynamic+phases >> >> Thoughts? >> -- >> Sent from my phone >> > -- > Sent from my phone > -- Sent from my phone
Re: Dynamic phases proposal
Robert, Michael, Tibor, let’s continue here (though I asked Infra and it’s fine that anyone in the community can join our Slack) On Fri 25 Oct 2019 at 20:01, Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > https://cwiki.apache.org/confluence/display/MAVEN/Dynamic+phases > > Thoughts? > -- > Sent from my phone > -- Sent from my phone
Dynamic phases proposal
https://cwiki.apache.org/confluence/display/MAVEN/Dynamic+phases Thoughts? -- Sent from my phone