Afaict, running with debug logs (mvn -X) will print the arguments passed to
the compiler, such that they can be passed to javac with Maven pushed out
if the equation.
They can then be inspected and tweaked, and then maven-compiler-plugin
configuration (hopefully) adjusted to what's expected.

Le lun. 4 déc. 2023, 03:58, Alexander Kriegisch <alexan...@kriegisch.name>
a écrit :

> Interesting problem. I think, it would make sense to get a minimal
> reproducer project showcasing the differences in the generated byte
> code. Probably there is some way for javax.tools.JavaCompiler to create
> identical byte code by setting the right combination of options. If
> something is missing in the Maven Compiler options or mishandled in
> Plexus, that could then be added or fixed. Otherwise, someone could
> instruct the OP how to use the existing options to achieve what he
> wants. WDYT?
>
> --
> Alexander Kriegisch
> https://scrum-master.de
>
>
> Olivier Lamy schrieb am 04.12.2023 04:39 (GMT +07:00):
>
> > Hi,
> > If by javac you mean the cli, per default m-compiler-p is not using
> > exactly this but in the process javax.tools.JavaCompiler.
> > If you want to really use javac (and so forking the compilation) you
> > must configure it via the fork option
> > (
> https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#fork
> )
> >
> >
> > On Mon, 4 Dec 2023 at 07:07, Dave Dyer <dd...@real-me.net> wrote:
> >>
> >>
> >> >
> >> >Maven, by default uses maven-compiler-plugin, but that plugin itself is
> >> >pluggable (can use javac, which is default, but also eclipse compiler,
> etc).
> >> >The plugin by default uses javac.
> >>
> >> The build I'm using seems to not be using javac - where is guidance
> >> to configuring it?
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> >> For additional commands, e-mail: users-h...@maven.apache.org
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to