Re: Proposal: new default directory layout for modular project

2025-05-17 Thread Andy Law
From: Martin Desruisseaux Date: Saturday, 17 May 2025 at 17:46 To: Andy Law , Maven Developers List Subject: Re: Proposal: new default directory layout for modular project Le 2025-05-17 à 18 h 30, Andy Law a écrit : How do multi-release and multi-module relate one to another From the user&#

Re: Proposal: new default directory layout for modular project

2025-05-17 Thread Martin Desruisseaux
Le 2025-05-17 à 18 h 30, Andy Law a écrit : How do multi-release and multi-module relate one to another From the user's point of view, they are orthogonal. We can use multi-releases or not. We can use multi-modules or not. Those two features are governed by two independent XML elements inside

Re: Proposal: new default directory layout for modular project

2025-05-17 Thread Andy Law
target use case? Later, Andy From: Martin Desruisseaux Date: Friday, 16 May 2025 at 16:27 To: dev@maven.apache.org Subject: Re: Proposal: new default directory layout for modular project Le 2025-05-16 à 15 h 01, Andy Law a écrit : > > OK. I see the purpose of the tag now. > To e

Re: Proposal: new default directory layout for modular project

2025-05-16 Thread Martin Desruisseaux
Le 2025-05-16 à 15 h 01, Andy Law a écrit : OK. I see the purpose of the tag now. To elaborate on the purpose of : we could argue that javac should be able to discover this information itself by parsing the module-info file. But a single module can have its source files split in many direct

Re: Proposal: new default directory layout for modular project

2025-05-16 Thread Guillaume Nodet
Well, we just did that for Maven 4 in the pom schema. Not everyone has made the switch yet... It'll take some time. Le ven. 16 mai 2025 à 15:12, Gary Gregory a écrit : > User POV here: I find it confusing that I can't tell when people talk about > a Maven module versus a JPMS module. My knee j

Re: Proposal: new default directory layout for modular project

2025-05-16 Thread Gary Gregory
User POV here: I find it confusing that I can't tell when people talk about a Maven module versus a JPMS module. My knee jerk reaction is that Maven 3 should deprecate its use of "module" in favor of "project" (including XML tags) and Maven 4 only use "module" only for JPMS. 2c, Gary On Fri, May

Re: Proposal: new default directory layout for modular project

2025-05-16 Thread Andy Law
@maven.apache.org Subject: Re: Proposal: new default directory layout for modular project Le 2025-05-16 à 14 h 27, Andy Law a écrit : >> The most natural way is to do parent/moduleX/src/main/java (and siblings) >> and handle the compiler plugin in parent to be jpms specific, no technical &g

Re: Proposal: new default directory layout for modular project

2025-05-16 Thread Andy Law
Subject: Re: Proposal: new default directory layout for modular project I hope you guys did understand that we're talking only about JPMS modules and only when a give (sub-)project contains more than one JPMS module: https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmaven.apach

Re: Proposal: new default directory layout for modular project

2025-05-16 Thread Martin Desruisseaux
Le 2025-05-16 à 14 h 27, Andy Law a écrit : >> The most natural way is to do parent/moduleX/src/main/java (and siblings) >> and handle the compiler plugin in parent to be jpms specific, no technical >> blocker, no maven core change needed > This (^^) just seems so natural, I can’t believe tha

Re: Proposal: new default directory layout for modular project

2025-05-16 Thread Guillaume Nodet
écrit : > From: Romain Manni-Bucau > Date: Friday, 16 May 2025 at 08:10 > To: Maven Developers List > Subject: Re: Proposal: new default directory layout for modular project > The most natural way is to do parent/moduleX/src/main/java (and siblings) > and handle the compiler plug

Re: Proposal: new default directory layout for modular project

2025-05-16 Thread Guillaume Nodet
This is very unnatural in maven, where all the source code usually resides in the src directory for a given project. Typical maven projets has a number of files in the root, a src directory and the target directory which contains all generated files. Starting to use other directories is much more d

Re: Proposal: new default directory layout for modular project

2025-05-16 Thread Andy Law
From: Romain Manni-Bucau Date: Friday, 16 May 2025 at 08:10 To: Maven Developers List Subject: Re: Proposal: new default directory layout for modular project The most natural way is to do parent/moduleX/src/main/java (and siblings) and handle the compiler plugin in parent to be jpms specific, no

Re: Proposal: new default directory layout for modular project

2025-05-16 Thread Romain Manni-Bucau
Well, you can still use a standard maven layout and map 1-1 with the underlying plugin by configuration. The most natural way is to do parent/moduleX/src/main/java (and siblings) and handle the compiler plugin in parent to be jpms specific, no technical blocker, no maven core change needed. Not su

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Guillaume Nodet
Still in favor of #1 Le jeu. 15 mai 2025 à 18:26, Martin Desruisseaux < martin.desruisse...@geomatys.com> a écrit : > Hello all > > Currently, the default directory for source code in Maven 4 is: > > src/${scope}/${lang} > > Where ${scope} is "main" or "test" and ${lang} is "java" or "resourc

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Martin Desruisseaux
Le 2025-05-15 à 22 h 02, Andy Law a écrit : I still think that the new folder structure feels “dirty”, and from my current position of ignorance, it also feels like the element under actually creates a problem that didn’t really exist. The goal of this JPMS work is to give more control to

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Romain Manni-Bucau
the > picture. That just feels “dirty”. > > Later, > > Andy > > > From: Martin Desruisseaux > Date: Thursday, 15 May 2025 at 19:37 > To: dev@maven.apache.org > Subject: Re: Proposal: new default directory layout for modular project > Le 2025-05-15 à 2

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Andy Law
@maven.apache.org Subject: Re: Proposal: new default directory layout for modular project Le 2025-05-15 à 20 h 26, Andy Law a écrit : > > I confess that I was using “standard” in the context of what I > understand to be the _Maven_ standard, since this is the Maven > developers list > Th

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Andy Law
Subject: Re: Proposal: new default directory layout for modular project Le 2025-05-15 à 20 h 26, Andy Law a écrit : > > I confess that I was using “standard” in the context of what I > understand to be the _Maven_ standard, since this is the Maven > developers list > The core issue is

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Martin Desruisseaux
Le 2025-05-15 à 19 h 55, Sergey Chernov a écrit : Is "src/${scope}-${module}/${lang}" a considerable option? It wasn't mentioned in previous discussions on GitHub. I just added it as a 4th proposal in the wiki page.     Martin

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Martin Desruisseaux
Le 2025-05-15 à 20 h 26, Andy Law a écrit : I confess that I was using “standard” in the context of what I understand to be the _Maven_ standard, since this is the Maven developers list The core issue is that we need a different directory for each module. I don't see how a new type for JPM

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Andy Law
: Proposal: new default directory layout for modular project Le 2025-05-15 à 19 h 54, Andy Law a écrit : > > Or maybe go the whole hog and define a new type > specifically for jpms and just use the standard layouts underneath that? > Does "standard layouts" means "layout de

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Martin Desruisseaux
Le 2025-05-15 à 19 h 54, Andy Law a écrit : Or maybe go the whole hog and define a new type specifically for jpms and just use the standard layouts underneath that? Does "standard layouts" means "layout defined by the javac man page"? If yes, the default layout is just "src/${module}", with

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Martin Desruisseaux
Le 2025-05-15 à 19 h 39, Romain Manni-Bucau a écrit : I still fail why you need to not respect current maven layout, Because it doesn't work with multi-release compilation. you are allowed to enhance plugins to be inter maven modules if you want - tycho does it for years it adds layers of

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Martin Desruisseaux
Hello David The usefulness of multi-modules compilation may be debated, but I don't think that Maven should impose its view on users. Multi-modules is a Java feature that exists, is documented, standardized and officially supported. It does provide some benefits. It may come at the cost of so

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Sergey Chernov
Is "src/${scope}-${module}/${lang}" a considerable option? This may preserve classic file layout back compatibility when the module part is undefined. Also it will be alphabetically sortable in the filesystem (inside of src/ dir). On Thu, May 15, 2025 at 7:40 PM Romain Manni-Bucau wrote: > I sti

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Andy Law
Or maybe go the whole hog and define a new type specifically for jpms and just use the standard layouts underneath that? Later, Andy From: Romain Manni-Bucau Date: Thursday, 15 May 2025 at 18:42 To: Maven Developers List Subject: Re: Proposal: new default directory layout for modular

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Romain Manni-Bucau
I still fail why you need to not respect current maven layout, you are allowed to enhance plugins to be inter maven modules if you want - tycho does it for years - and it would be more natural for maven land IMHO and enables JPMS for the few willing to use this mode, no? Romain Manni-Bucau @rmanni

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread David Lloyd
I'll start by saying that it definitely should not be 3, because you will not be able to tell by structure (for certain) whether a directory constitutes a module or whether it is some other kind of resource. As someone who has been at least somewhat involved with the JPMS since the beginning, and

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Martin Desruisseaux
Le 2025-05-15 à 19 h 03, Andy Law a écrit : I don’t understand why this is so different from an aggregated project, with ${module} above src, but I may be missing the point because I’ve not spent any time thinking about JPMS yet. Because it enables compile-time verification that the compiler

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Martin Desruisseaux
Le 2025-05-15 à 18 h 52, Romain Manni-Bucau a écrit : I didn't get why we can't get 1 artifact = 1 module so can stick to current convention. I presume that you mean "1 subproject = 1 module". It is still possible. Nothing force users to abandon that model if they like it. "1 artifact = 1 m

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Andy Law
} though. Conceptually (to me), a module contains scopes and “languages”. Later, Andy From: Romain Manni-Bucau Date: Thursday, 15 May 2025 at 17:54 To: Maven Developers List Subject: Re: Proposal: new default directory layout for modular project Hi Martin, I didn't get why we can&#x

Re: Proposal: new default directory layout for modular project

2025-05-15 Thread Romain Manni-Bucau
Hi Martin, I didn't get why we can't get 1 artifact = 1 module so can stick to current convention. AFAIK maven always rejected multiple "main" artifacts/module even if we all do. Romain Manni-Bucau @rmannibucau | .NET Blog | Blog