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.

You’re going to give me headaches navigating if you put ${module} anywhere 
below either ${scope} or ${lang} though. Conceptually (to me), a module 
contains scopes and “languages”.

Later,

Andy


From: Romain Manni-Bucau <rmannibu...@gmail.com>
Date: Thursday, 15 May 2025 at 17:54
To: Maven Developers List <dev@maven.apache.org>
Subject: Re: Proposal: new default directory layout for modular project
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 
<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fx.com%2Frmannibucau&data=05%7C02%7C%7Ce8f554eb399943ffdc5708dd93d0e707%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C638829248808796552%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=yy9tmMTeUAceXw4eYWothFKVtKmBvRMAGpZqQa8PGRM%3D&reserved=0<https://x.com/rmannibucau>>
 | .NET Blog
<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdotnetbirdie.github.io%2F&data=05%7C02%7C%7Ce8f554eb399943ffdc5708dd93d0e707%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C638829248808814070%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=SaedKZUMunxeVrduNllbof%2B%2B5yVFKssxV50cS2ieCXc%3D&reserved=0<https://dotnetbirdie.github.io/>>
 | Blog 
<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Frmannibucau.github.io%2F&data=05%7C02%7C%7Ce8f554eb399943ffdc5708dd93d0e707%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C638829248808826500%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=h1cI1vLNlwYTQhNl1hxqwuie0x7lAJBX14LB1dFU7NM%3D&reserved=0<https://rmannibucau.github.io/>>
 | Old
Blog 
<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Frmannibucau.wordpress.com%2F&data=05%7C02%7C%7Ce8f554eb399943ffdc5708dd93d0e707%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C638829248808839736%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=qVCorot9nYJBSe94NLQe77ZAhm2eRrYiyKcRiyItK5c%3D&reserved=0<http://rmannibucau.wordpress.com/>>
 | Github
<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frmannibucau&data=05%7C02%7C%7Ce8f554eb399943ffdc5708dd93d0e707%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C638829248808852140%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=N%2Bu4xFxc6UBD8m%2F%2BFv3pN8uTfPy0qckUjSWC2CF4Fr0%3D&reserved=0<https://github.com/rmannibucau>>
 | LinkedIn
<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fin%2Frmannibucau&data=05%7C02%7C%7Ce8f554eb399943ffdc5708dd93d0e707%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C638829248808864432%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=4IoLqIWra6A6M0K87ifsc7MfbF50S3%2FIMNO%2FP10IHQ4%3D&reserved=0<https://www.linkedin.com/in/rmannibucau>>
 | Book
<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.packtpub.com%2Fen-us%2Fproduct%2Fjava-ee-8-high-performance-9781788473064&data=05%7C02%7C%7Ce8f554eb399943ffdc5708dd93d0e707%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C638829248808876884%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=LZoc%2BxWIWZm2wjOFyFW%2Bg0TwAnLhslpTs2Fc6pxeXWs%3D&reserved=0<https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064>>


Le jeu. 15 mai 2025 à 18:28, 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 "resources".
> However, in the case of a multi-modules JPMS projects, we need to add
> the module name somewhere. Notes:
>
>   * This change applies only to multi-modules projects. Non-modular
>     projects, or modular projects with only one module, will see no change.
>   * The output directory of a multi-modules project also changes: it
>     becomes target/classes/${module} where ${module} is inserted by
>     javac itself. So the addition of a ${module} directory is an
>     invention of this proposal.
>
> Three proposals have been discussed on the pull request #2278:
>
>  1. src/${module}/${scope}/${lang}
>  2. src/${lang}/${module}/${scope}
>  3. src/${scope}/${lang}/${module}
>
> Proposals 1 and 3 are the same as the current Maven convention with only
> ${module} added either at the beginning or at the end. Proposal 2 is
> more disruptive, but produces the most compact directory trees and takes
> in account the fact that each language has its own concept of modules
> with its own naming conventions. Proposals 1 and 3 are more
> conservative, with proposal 1 seing modules as a kind of sub-projects
> (files related to the same module are kept together) and proposal 3
> rather seing the module system as an extension of the package system.
> These 3 proposals are described in more details there, together with
> examples:
>
>
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FMAVEN%2FDefault%2Bdirectory%2Bfor%2Bmodular%2Bprojects&data=05%7C02%7C%7Ce8f554eb399943ffdc5708dd93d0e707%7C2e9f06b016694589878910a06934dc61%7C0%7C0%7C638829248808889302%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=uP2lPzQCIZC4y70U1Ose0heB8887g4OHDu4QKY6i8fs%3D&reserved=0<https://cwiki.apache.org/confluence/display/MAVEN/Default+directory+for+modular+projects>
>
> What peoples think that the default should be?
>
>      Martin
>
>
The University of Edinburgh is a charitable body, registered in Scotland, with 
registration number SC005336. Is e buidheann carthannais a th’ ann an Oilthigh 
Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336.

Reply via email to