Re: Maven 4: -pl !... is not recursive

2021-03-23 Thread Martin Kanters
I agree that we should document changes between Maven 3 and 4 thoroughly, a migration table is a good idea. I've added a comment in the maven-site ticket: https://issues.apache.org/jira/browse/MNGSITE-444 Feel free to add your scenarios there. I'm convinced your scenarios can be done using Maven 4

Re: Maven 4: -pl !... is not recursive

2021-03-23 Thread Romain Manni-Bucau
Le mar. 23 mars 2021 à 08:34, Martin Kanters a écrit : > Alright, let's take a look back at your problem situation. I tried to > explain others, but figured out I didn't completely understand it. > Is this what you meant? > > root: > ... foo: > foo-a > foo-b > ... images: >

Re: Maven 4: -pl !... is not recursive

2021-03-23 Thread Martin Kanters
Alright, let's take a look back at your problem situation. I tried to explain others, but figured out I didn't completely understand it. Is this what you meant? root: ... foo: foo-a foo-b ... images: image-a image-b subparent: . subimage-a .

Re: Maven 4: -pl !... is not recursive

2021-03-22 Thread Romain Manni-Bucau
Le lun. 22 mars 2021 à 20:49, Martin Kanters a écrit : > Alright, there indeed are specific problems that cannot be solved with > -pl. Then again the automatic recursiveness does give benefit that we > didn't have in 3.6.3. > Your problem can be solved using profiles, multiple invocations, exact

Re: Maven 4: -pl !... is not recursive

2021-03-22 Thread Martin Kanters
Alright, there indeed are specific problems that cannot be solved with -pl. Then again the automatic recursiveness does give benefit that we didn't have in 3.6.3. Your problem can be solved using profiles, multiple invocations, exact -pl module specifications or different directory formats. I guess

Re: Maven 4: -pl !... is not recursive

2021-03-22 Thread Romain Manni-Bucau
Le lun. 22 mars 2021 à 16:07, Martin Kanters a écrit : > Err, let's keep using examples to avoid miscommunication :p If I > understand you correctly, you mean this: > > root: > ... images: > image-a > image-b > ... assemblies: > assembly-a > assembly-b > > When

Re: Maven 4: -pl !... is not recursive

2021-03-22 Thread Martin Kanters
Err, let's keep using examples to avoid miscommunication :p If I understand you correctly, you mean this: root: ... images: image-a image-b ... assemblies: assembly-a assembly-b When running from root, you can use: > mvn -pl !root,!images,!assemblies -N This

Re: Maven 4: -pl !... is not recursive

2021-03-22 Thread Romain Manni-Bucau
Le lun. 22 mars 2021 à 15:03, Martin Kanters a écrit : > Hey Romain, > > Your example will work with -N when MNG-7112 [1] is implemented (which we > are working on as we speak). > MNG-7112 says: -N together with a project exclusion (via -pl) will make the > project exclusion non-recursive. So it

Re: Maven 4: -pl !... is not recursive

2021-03-22 Thread Martin Kanters
Hey Romain, Your example will work with -N when MNG-7112 [1] is implemented (which we are working on as we speak). MNG-7112 says: -N together with a project exclusion (via -pl) will make the project exclusion non-recursive. So it will not exclude the children. Following your example, > cd images-

Re: Maven 4: -pl !... is not recursive

2021-03-22 Thread Romain Manni-Bucau
Hi, Just saw the PR was merged but it is actually still a regression, what's the plan to keep this kind of build working: Structure: . root |- core |- ... `- images-parent // can be assemblies too or anything else |- image1 |- ... `- imageN > cd images-parent && mvn m

Re: Maven 4: -pl !... is not recursive

2021-02-28 Thread Romain Manni-Bucau
Le dim. 28 févr. 2021 à 10:15, Robert Scholte a écrit : > We should be talking about consistency. > We have a flag --non-recursive, which implies that recursive is the > default. > With Maven 3 that is just not always the case and this should be fixed. > Maven 4 is the right version to do so. > >

Re: Maven 4: -pl !... is not recursive

2021-02-28 Thread Robert Scholte
We should be talking about consistency. We have a flag --non-recursive, which implies that recursive is the default. With Maven 3 that is just not always the case and this should be fixed. Maven 4 is the right version to do so. Using -pl -N does not work with Maven 3: it'll say "Couldn't find th

Re: Maven 4: -pl !... is not recursive

2021-02-26 Thread Romain Manni-Bucau
Le ven. 26 févr. 2021 à 14:30, Robert Scholte a écrit : > This discussion is about aggregators, and not about parent. > Quite often an aggregator is also the parent of its modules, but that is > not required. > Ack > > Calling -pl with Maven3 behaves unnatural: if you want to > call a specifi

Re: Maven 4: -pl !... is not recursive

2021-02-26 Thread Robert Scholte
This discussion is about aggregators, and not about parent. Quite often an aggregator is also the parent of its modules, but that is not required. Calling -pl with Maven3 behaves unnatural: if you want to call a specific aggregator, you want its modules to be built. Hence I still support the c

Re: Maven 4: -pl !... is not recursive

2021-02-26 Thread Romain Manni-Bucau
I still think it is wrong to have such a global toggle + break backward compatibility (-pl + -N is *already* used for what it is today which is not the proposal but -pl parent without -N is also already used and works well). You can also take into consideration that -pl -module -N meaning is comple

Re: Maven 4: -pl !... is not recursive

2021-02-26 Thread Martin Kanters
I've had a talk this morning with Robert Scholte and Maarten Mulders about this, since I had the feeling we were not getting further in this mail thread. First of all, we all agreed that we definitely needed functionality for both recursive and non-recursive project selection. What Robert prefers

Re: Maven 4: -pl !... is not recursive

2021-02-21 Thread Romain Manni-Bucau
Put some comments inline but agree another minilanguage solution works. Maybe -pl !!parent? Le dim. 21 févr. 2021 à 22:08, Martin Kanters a écrit : > Romain: 2 has overlap if I'm not mistaken, what if the user invokes: mvn > -pl project-a -plr !project-a. Perhaps the user should be able to only

Re: Maven 4: -pl !... is not recursive

2021-02-21 Thread Martin Kanters
Romain: 2 has overlap if I'm not mistaken, what if the user invokes: mvn -pl project-a -plr !project-a. Perhaps the user should be able to only select aggregator poms via -plr.. And I'm not sure how the alias function would work. I assume something like: - pom.xml config (psuedo code): -pl parent,

Re: Maven 4: -pl !... is not recursive

2021-02-21 Thread Falko Modler
My 2 cents: Please don't drop the recursive behavior again because it is really useful! Crazy idea (just brainstorming here): -pl foo builds only foo -pl foo+ builds foo and its children, wherever they are exactly This would also co-exist with the ! and ? prefixes. PS: Since if often use shell

Re: Maven 4: -pl !... is not recursive

2021-02-21 Thread Romain Manni-Bucau
Le dim. 21 févr. 2021 à 20:39, Martin Kanters a écrit : > Hm, so I guess that's indeed a valid reason to keep the old functionality > working. Thanks for the enlightenment, Romain. > Still I think it makes more sense to make project selection recursive by > default, but it's not straightforward t

Re: Maven 4: -pl !... is not recursive

2021-02-21 Thread Martin Kanters
Hm, so I guess that's indeed a valid reason to keep the old functionality working. Thanks for the enlightenment, Romain. Still I think it makes more sense to make project selection recursive by default, but it's not straightforward to come up with a nice combination of flags. Let's summarize: 1. -

Re: Maven 4: -pl !... is not recursive

2021-02-20 Thread Romain Manni-Bucau
I like the regex idea but wildcard (*) does not work well due to common shell expansion (or it already works but it is outside of maven scope to be concrete). My 2cts would be that, to be honest, I think we all lead to have aliases in maven for potentially very long commands (there was some thread

Re: Maven 4: -pl !... is not recursive

2021-02-20 Thread Falko Modler
Thanks for the quick reaction/answers! TBH, I haven't fully understood why -N cannot be used here. I do understand that -N reduces the reactor to one project (before project selection via -pl can kick in). But what if -N wouldn't be applied if -pl is present? It would then become a "secondary"

Re: Maven 4: -pl !... is not recursive

2021-02-20 Thread Romain Manni-Bucau
; > >> Martin > >> > >> [1] https://issues.apache.org/jira/browse/MNG-6981 > >> [2] https://issues.apache.org/jira/browse/MNG-7102 > >> > >> Op za 20 feb. 2021 om 10:04 schreef Markus KARG >: > >> > >> > Yes it might be the better solutio

Re: Maven 4: -pl !... is not recursive

2021-02-20 Thread Martin Kanters
/issues.apache.org/jira/browse/MNG-7102 >> >> Op za 20 feb. 2021 om 10:04 schreef Markus KARG : >> >> > Yes it might be the better solution to keep it backwards compatible and >> do >> > recursive -plr X / -plr !X as a new option. >> > >> >

Re: Maven 4: -pl !... is not recursive

2021-02-20 Thread Romain Manni-Bucau
ucau> | Book > > < > > > https://www.packtpub.com/application-development/java-ee-8-high-performance > > > > > > > > > Le sam. 20 févr. 2021 à 09:14, Markus KARG a > > écrit : > > > > > I second that. It is counterintuitive. It

Re: Maven 4: -pl !... is not recursive

2021-02-20 Thread Martin Kanters
as a new option. >> >> -Ursprüngliche Nachricht- >> Von: Romain Manni-Bucau [mailto:rmannibu...@gmail.com] >> Gesendet: Samstag, 20. Februar 2021 09:20 >> An: Maven Developers List >> Betreff: Re: Maven 4: -pl !... is not recursive >> >> Agree i

Re: Maven 4: -pl !... is not recursive

2021-02-20 Thread Martin Kanters
[mailto:rmannibu...@gmail.com] > Gesendet: Samstag, 20. Februar 2021 09:20 > An: Maven Developers List > Betreff: Re: Maven 4: -pl !... is not recursive > > Agree it should be alignde, just wonder how you handle '-N' equivalent if > -pl is recursive (so until there is a solutio

AW: Maven 4: -pl !... is not recursive

2021-02-20 Thread Markus KARG
submodules. > -Markus > > > -Ursprüngliche Nachricht- > Von: Falko Modler [mailto:f.mod...@gmx.net] > Gesendet: Samstag, 20. Februar 2021 01:39 > An: dev@maven.apache.org > Betreff: Maven 4: -pl !... is not recursive > > Hi everyone, > > I started playing

Re: Maven 4: -pl !... is not recursive

2021-02-20 Thread Romain Manni-Bucau
> > > -Ursprüngliche Nachricht- > Von: Falko Modler [mailto:f.mod...@gmx.net] > Gesendet: Samstag, 20. Februar 2021 01:39 > An: dev@maven.apache.org > Betreff: Maven 4: -pl !... is not recursive > > Hi everyone, > > I started playing around with 4.0.0-alpha-1-20210

AW: Maven 4: -pl !... is not recursive

2021-02-20 Thread Markus KARG
I second that. It is counterintuitive. It would be beneficial if -pl !X would also exclude ist submodules. -Markus -Ursprüngliche Nachricht- Von: Falko Modler [mailto:f.mod...@gmx.net] Gesendet: Samstag, 20. Februar 2021 01:39 An: dev@maven.apache.org Betreff: Maven 4: -pl !... is not

Maven 4: -pl !... is not recursive

2021-02-19 Thread Falko Modler
Hi everyone, I started playing around with 4.0.0-alpha-1-20210214.163053-40 and I realized that -pl X will now also build submodules of X but -pl !X will only exclude X, not its submodules. Isn't this a bit inconsistent? Cheers, Falko -