Fix compatibility with Maven Core 4.1.0-SNAPSHOT#991
Fix compatibility with Maven Core 4.1.0-SNAPSHOT#991desruisseaux wants to merge 2 commits intoapache:masterfrom
Conversation
… filenames between quotes. Opportunistically add a safety when path using only for debugging purposes cannot be relativized.
This is a partial revert of apache#2505 based on the constatation that above PR has not been merged in 4.0.x. For making the two branches consistent, we need to either port or revert 2505. A revert is less disruptive as no Maven 4.1.x version has been released yet and it would avoid apache/maven-compiler-plugin#991.
This is a partial revert of apache#2505 based on the observation that above PR has not been merged in 4.0.x. For making the two branches consistent, we need to either port or revert 2505. A revert is less disruptive as no Maven 4.1.x version has been released yet and it would avoid apache/maven-compiler-plugin#991.
Would it be better to backport #2505 ? Related to #11435 |
|
I propose to not backport 2505. The reason is that quotes are wanted when generating a shell script, but not wanted when using |
This is a partial revert of #2505 based on the observation that above PR has not been merged in 4.0.x. For making the two branches consistent, we need to either port or revert 2505. A revert is less disruptive as no Maven 4.1.x version has been released yet and it would avoid apache/maven-compiler-plugin#991.
|
Discard the pull request. This is replaced by apache/maven#11435. |
Edit: a previous version of this pull request wrongly said that this issue exists since Maven core 4.0.0-rc-5. However after verification, it seems that apache/maven#2505 has never been ported to the 4.0.x branch.
Since Maven core 4.1.0-SNAPSHOT, options formatted by
JavaPathTypehave file names between quotes (apache/maven#2505). This is desired for producing robusttarget/javac.argsfiles allowing users to reproduce a compilation. However, the compiler plugin also has aWorkaroundForPatchModuleclass because (as of Java 24)JavaFileManagerdoes not acceptStandardLocation.PATCH_MODULE_PATHin calls tosetLocationForModule(…). That workaround expect file names without quotes. Therefore, the quotes added by Maven core needs to be removed.Note: it does not necessarily means that Maven core should be modified, because
WorkaroundForPatchModuleis really (as its name implies) a workaround for a problem that should not exist.