You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl Heinz Marbaise (Jira)" <ji...@apache.org> on 2020/03/07 13:07:00 UTC

[jira] [Commented] (MCOMPILER-400) Explicit way to disable toolchain for compiler and use in-process compiler

    [ https://issues.apache.org/jira/browse/MCOMPILER-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17054045#comment-17054045 ] 

Karl Heinz Marbaise commented on MCOMPILER-400:
-----------------------------------------------

Why not compiling/running on JDK11 and defining release to 8 ?

> Explicit way to disable toolchain for compiler and use in-process compiler
> --------------------------------------------------------------------------
>
>                 Key: MCOMPILER-400
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-400
>             Project: Maven Compiler Plugin
>          Issue Type: Wish
>    Affects Versions: 3.8.1
>            Reporter: Tuure Laurinolli
>            Priority: Major
>
> We use toolchains configured with the Maven Toolchains plugin to run tests on both JDK 8 and JDK 11. We still only compile on JDK 8, and the JVM runnin Maven is 8. We want to avoid forking a new JVM per-compilation because it more than doubles the basic build & run unit tests time for out project from 200 to 450 seconds since our module structure is fairly granular.
> By looking at the source code of Maven Compiler plugin, we figured out that setting *fork* to false and *executable* to whatever we can avoid using a toolchain in the compiler plugin. However, this seems rather hackish, and we would like to see a solution that's morelikely to stay supported in the future as well.
> Some options that come to mind:
> 1) Don't use toolchain if *fork* is disabled, regardless of *executable* value. The upside is that this is arguably what should happen anyway. Why would we want to fork in the presence of a toolchain if fork is set to false?
> 2) Add a specific flag to disable toolchain usage in the compiler plugin, regardless of other flags. Better than 1) in that current configurations retain their current semantics, but seems a bit odd.
> 3) Document the current state of things as the supported way to achieve compilation-in-process-even-if-toolchain-is-configured.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)