Use JDK11 by default when building Hibernate Search

Description

This is not about creating Java 11 bytecode; we need to stick to Java 8 bytecode for now, so that Hibernate Search can be used on older JDKs.

However, building on JDK8 is becoming increasingly difficult, and it will become worse. Sonarcloud.io, in particular, will stop supporting JDK8 on October 2020: https://sonarcloud.io/documentation/upcoming/

We should:

  1. Change the Jenkinsfile/pom to build with JDK11 by default, but still target Java 8 bytecode for the main source.

  2. Change the Jenkinsfile to run integration tests with JDK8 on the artifacts created by JDK11 (see below)

  3. Remove support for building with JDK8, at least for the published artifacts (raise the minimum JDK in maven-enforcer-plugin).

  4. Remove configuration specific to JDK8/9/10 in the pom files, at least for the published artifacts.

For #2, two possible solutions:

  1. Create a two-step build (create the artifacts, then test them), which could prove challenging, but could also be a great first step towards a cleaner release pipeline (currently the tested artifacts are not the ones we release, though they are built from the same source code in the same environment).

  2. Have surefire/failsafe use a different JDK than the one used to run Maven when running tests. Probably easy to do, but the other solution is more powerful.

Environment

None

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major
Configure