You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your enhancement related to a problem? Please describe
Would it be feasible to make crd-generator-maven-plugin be toolchain aware? My scenario is that the default Java comes from JDK11, but the Java Operator SDK is compiling with JDK17, and I'm trying to build a CRD when I build an operator.
The maven toolchain plugin makes it easy to compile the operator code with JDK17, but the CRD generator errors out suggesting that it's running my default Java (11), which I assume is because mvn itself is running my default JDK:
[ERROR] Failed to execute goal io.fabric8:crd-generator-maven-plugin:7.1.0:generate (default) on project i2k-operator: Execution default of goal io.fabric8:crd-generator-maven-plugin:7.1.0:generate failed: An API incompatibility was encountered while executing io.fabric8:crd-generator-maven-plugin:7.1.0:generate: java.lang.UnsupportedClassVersionError: com/i2kconnect/kubernetes/operator/customresource/Platform has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
This is easy to fix by running JAVA_HOME=/path/to/jdk17 mvn package but it would be nice if the toolchain worked.
Describe the solution you'd like
Add a configuration section to specify the JDK version:
Is your enhancement related to a problem? Please describe
Would it be feasible to make crd-generator-maven-plugin be toolchain aware? My scenario is that the default Java comes from JDK11, but the Java Operator SDK is compiling with JDK17, and I'm trying to build a CRD when I build an operator.
The maven toolchain plugin makes it easy to compile the operator code with JDK17, but the CRD generator errors out suggesting that it's running my default Java (11), which I assume is because mvn itself is running my default JDK:
This is easy to fix by running
JAVA_HOME=/path/to/jdk17 mvn package
but it would be nice if the toolchain worked.Describe the solution you'd like
Add a configuration section to specify the JDK version:
Describe alternatives you've considered
JAVA_HOME=/path/to/jdk17 mvn package
Works, but easy to forget to specify the JAVA_HOME.
Additional context
No response
The text was updated successfully, but these errors were encountered: