seregamorph commented on issue #12646: URL: https://github.com/apache/maven/issues/12646#issuecomment-5152278427
Ok. Let's see this problem from the quite different perspective. Maven historically executes command `mvn clean install` as a single sequence of goals (yes, these are two lifecycles, but these are aggregated to a single list of goals passed for simple iteration into `DefaultMojosExecutionStrategy`). Other build tools, like Gradle, do it a different way: for each "lifecycle" (I know it's different on the low level in Gradle) it executes the goals 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`). Is this is 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. Am I missing something? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
