> Just a note that if using the Source Module Hierarchy introduced by the > Java module work in Maven 4, we effectively get this model.
Do you mean maven-compiler-plugin 4.0.0 (now beta)? As 3.15.0 behaves the old way, as far as I can see on the timeline. On Mon, Aug 3, 2026 at 6:32 PM Martin Desruisseaux via dev < [email protected]> wrote: > Hello Sergey and all > > Omitting some emails fragment (the …snip…) for brevity: > > Le 03/08/2026 à 18:07, Sergey Chernov a écrit : > > Maven historically executes commands like mvn clean install as a single > > sequence of goals (…snip…). > > Other build tools, like Gradle, do it a different way: for each > "lifecycle" > > (…snip…) it executes the requestested goals/lifecycles for all modules, > > then goes to the next requested lifecycle. > > So, the mvn clean install in this case would look like this: > > > > - run clean lifecycle for all modules [optionally in parallel, but > still > > only clean] > > - when the clean lifecycle is over, run default lifecycle [validate.. > > install] for all modules > > > > IMO this behavior has advantages, but not sure it's compatible with e.g. > -rf > > (--resume-from), or all kinds of CLI-executed maven goals (mvn > plugin:goal > > ). > > Is this a considerable option? I know this may be too late for such a > > drastic change, but this could be a possible solution as it eliminates > the > > race condition with cleaning target/ of the root module. > > Just a note that if using the Source Module Hierarchy introduced by the > Java module work in Maven 4, we effectively get this model. This is > because all Java modules declared in a Maven sub-project are compiled in > a single Maven Compiler Plugin execution. Then all JAR files are created > in a single Maven JAR Plugin execution, etc. > > Martin > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
