Wow, I missed that one.
I'm not sure I like this kind of automatism (module discovery).
Maybe this also breaks some plugins? For example: I have more than one
custom plugin that simply reads the root POM and extracts the modules
for further processing. Of course that also ignores modules in profiles
so maybe a non-issue there. I have to think more about this.
Also, seems to be a good way to slow down your builds. Scanning
directories is somehow expensive on some platforms.
But if I am stating a <modules> (or the now preferred <subprojects>)
section in my root POM this behavior is disabled and only my actually
defined modules/subprojects are considered, right?
Greeings,
Thomas Reinhardt
On 15/09/2025 11:02, Guillaume Nodet wrote:
I just replied on the issue. This is the expected behavior for:
* 4.1.0 models
* which have a `pom` packaging
* which defines no subprojects/modules
In such cases, all direct subdirectories which contain a pom will be
considered as subprojects.
However, I think the original idea of the rule `which defines no
subprojects/modules` was to also check for profiles, else, there would be
no way to actually enable/disable some subprojects based on a profile,
which may be what #11114 is about.
Le ven. 12 sept. 2025 à 16:24, Nikita Skvortsov
<[email protected]> a écrit :
Dear developers,
My colleague, +Alexander Bubenchikov <[email protected]>
discovered an interesting behavior of Maven 4.0.0-rc-4. In short, Maven
picks up subprojects from subdirectories *without any modules/subprojects
definition* in pom.xml (reported as #11114
<https://github.com/apache/maven/issues/11114>).
Is it an expected behavior?
---
Nikita Skvortsov
Java Build Tools Team Lead
JetBrains N.V. | KvK reg. nr. 56460279
Gelrestraat 16, 1079 MZ Amsterdam, The Netherlands
T: + 31 (0)20 205 01 18 | F: +31 (0)20 205 01 19
E: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]