Right, I agree with your perspective.

Just note, however, that this stance will require the RM to create the 1.x
convenience binary with Java 8 only.  It will be incumbent on the RM to
ensure they build with Java 8, because if they accidentally build with Java
11, the binary distribution won't run on Java 8.

Adam


On Wed, Oct 30, 2019 at 11:56 AM Joe Witt <joe.w...@gmail.com> wrote:

> 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 <a...@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
> >
>

Reply via email to