plexus-compiler icon indicating copy to clipboard operation
plexus-compiler copied to clipboard

Version of the javac compiler cannot be determined corretly when custom compiler executable is set

Open luktom opened this issue 1 year ago • 1 comments

Hi,

we are using a javac wrapper for compiling our project, its doing some stuff and delegates the compilation to javac. The wrapper is set in the 'executable' property of the maven-compiler-plugin. The wrapper needs some custom arguments provided via the CLI arguments of compiler executable.

After updating the maven-compiler-plugin our project fails to compile, the root cause was introduced in the #357. The 'JavacCompiler#getOutOfProcessJavacVersion' invokes the compiler executable only with '-version' parameter, but without any custom parameters defined in the 'CompilerConfiguration#customCompilerArguments'. Thus our wrapper and possibly all custom executables are failing to run properly due to missing custom arguments.

luktom avatar Sep 09 '24 12:09 luktom

i'm still experimenting, but this change also appears to break setting up a toolchain for jdk 1.4 (don't ask) since that javac doesn;t support -version as a param

cmconti avatar Oct 16 '24 00:10 cmconti

Same as #420

slachiewicz avatar Nov 10 '25 10:11 slachiewicz