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://x.com/rmannibucau> | .NET Blog <https://dotnetbirdie.github.io/> | Blog <https://rmannibucau.github.io/> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book <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://cwiki.apache.org/confluence/display/MAVEN/Default+directory+for+modular+projects > > What peoples think that the default should be? > > Martin > >