Skip to content

Conversation

@desruisseaux
Copy link
Contributor

This pull request fixes #966, which has been reported when using toolchains (the actual issue was with forked compiler rather than toolchains).

Since this pull request touches forked compilation, it opportunistically harmonizes the behaviour of forked and non-forked compilations regarding when to generate the target/javac.args debug file(s). The harmonized behaviour is to generate these files when the compilation fails, or when the --verbose flag was given to Maven.

The pull request also tries to be a little bit more specific in the message of exceptions thrown when the compiler does not accept a --patch-module argument. This was a side-effect of the investigation on #966.

* More helpful exception when the workaround for the `--patch-module` option didn't work.
* Some safety against null values in the `basedir` and `mojoStatusPath` fields of the MOJO.
  While those fields should never be null, it happens sometime when testing snapshot versions of Maven core.
Includes the case of toolchains, which are implicitly forked processes.
…rocessor to run.

This commit takes in account the fact that `-proc:full` was the default before Java 23.
@desruisseaux desruisseaux merged commit d958a62 into apache:master Oct 14, 2025
20 checks passed
@github-actions
Copy link

@desruisseaux Please assign appropriate label to PR according to the type of change.

@github-actions github-actions bot added this to the 4.0.0-beta-3 milestone Oct 14, 2025
@desruisseaux desruisseaux deleted the fix/patch-module-in-fork branch October 14, 2025 18:08
@desruisseaux desruisseaux added bug Something isn't working java Pull requests that update Java code labels Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Module descriptors under META-INF not found

2 participants