Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Support building with one Java version and testing with another
Motivation ---------- Want to build using Java 17 (or later) and run tests against all supported versions. This lets the Java Columnar client require Java 17 and still live in the same repo as other SDKs, and also removes an obstacle to including the FIT performers which already require Java 17. Modifications ------------- Add class `Jvm`, a record that identifies a JVM by its cbdep package and version. Defer setting the JAVA_HOME and PATH environment variables until we execute Maven. This requires less boilerplate and is less error-prone than setting them in the stage declaration. Set the `jvm` Maven property so the surefire plugin uses the target JVM to run tests instead of Maven's JVM (which is now always Java 17). Upgrade OpenJDK 17 and OpenJDK 11 to versions more widely available via cbdep. Comment out the macOS stage; it's broken due to a misbehaving `wget` binary. Change-Id: Idbd8a42eadfe5b7c3fe35199be664915578838cc Reviewed-on: https://review.couchbase.org/c/couchbase-jvm-clients/+/212628 Tested-by: Build Bot <[email protected]> Reviewed-by: Graham Pople <[email protected]>
- Loading branch information