nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Witt <joe.w...@gmail.com>
Subject Re: Java 11 Compilation
Date Wed, 30 Oct 2019 17:55:53 GMT
Adam

Interesting.  Id say though that where we are now for nifi 1.x is perfect.
That matrix you shared as currently working seems ideal.

For nifi 2.x we cut bait on Java 8 and go with latest stable Java at that
time (11, 13)

thanks

On Wed, Oct 30, 2019 at 12:51 PM Adam Taft <adam@adamtaft.com> wrote:

> While building 1.10.0-rc3, I wanted to experiment with the compilation and
> runtime variants using Java 8 and Java 11.  The summary of this experiment
> was:
>
> Comp: Java 8   Run: Java 8  =>  SUCCESS
> Comp: Java 8   Run: Java 11 =>  SUCCESS
> Comp: Java 11  Run: Java 8  =>  FAILURE
> Comp: Java 11  Run: Java 11 =>  SUCCESS
>
> As introduced in JEP-247 [1], starting with Java 9, javac has the ability
> to compile to an older Java platform.  This was not possible previously
> without having multiple JDKs installed and specifying the '-bootclasspath'
> option in javac for your target.
>
> The newly introduced "--release" option to Java 9+ javac allows you to
> specify the target version using the documented API for that platform.
> This means replacing the '-source' and '-target' parameters with the
> '--release' option instead.
>
> In maven, that manifests itself as a configuration option to the
> maven-compiler-plugin, which is the 'maven.compiler.release' property. [2]
>
> The discussion here would be consideration for using the "release" option
> as opposed to our current setup which uses "source" and "target".  The
> benefit would be that all the deployment scenarios (above) could result in
> success.
>
> The downside though is that, without other changes, Java 11 would be
> required to compile NiFi.  It would still target Java 8 as a supported
> runtime (specifying "release=8"), but you'd have to build/compile with Java
> 11.  I don't think this should be a problem, but it's worth discussion.
>
> Thanks,
> Adam
>
> [1]  https://openjdk.java.net/jeps/247
> [2]
>
> https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#release
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message