Closed Paul6552 closed 1 month ago
Can you run mvn --version
and check that the Java version there is 21? Some people had some issues with this.
Because I don't see why Maven would complain about Java 21 not being supported if you are indeed using Java 21.
For what it's worth, I don't get any errors when running the following:
# docker build -t my-image:latest . --progress=plain
ARG QUARKUS_CLI_VERSION=3.11.1
ARG JAVA_VERSION=21.0.3-tem
ARG QUARKUS_BOM_VERSION=3.8.4
FROM registry.access.redhat.com/ubi8/ubi as base
RUN dnf update -y && dnf install -y curl zip && dnf clean all
FROM base as sdkman
RUN curl -s "https://get.sdkman.io" | bash
ENV SDKMAN_DIR="/root/.sdkman"
ENV PATH="${SDKMAN_DIR}/bin:${PATH}"
RUN bash -c "source ${SDKMAN_DIR}/bin/sdkman-init.sh && sdk version"
FROM sdkman as java
ARG JAVA_VERSION
RUN bash -c "source ${SDKMAN_DIR}/bin/sdkman-init.sh && sdk install java ${JAVA_VERSION}"
FROM java as quarkus
ARG QUARKUS_CLI_VERSION
RUN bash -c "source ${SDKMAN_DIR}/bin/sdkman-init.sh && sdk install quarkus ${QUARKUS_CLI_VERSION}"
FROM quarkus as quarkus-app
ARG QUARKUS_BOM_VERSION
RUN bash -c "source ${SDKMAN_DIR}/bin/sdkman-init.sh && quarkus create app --platform-bom=io.quarkus.platform:quarkus-bom:${QUARKUS_BOM_VERSION}"
FROM quarkus-app as quarkus-update
WORKDIR /code-with-quarkus
RUN bash -c "source ${SDKMAN_DIR}/bin/sdkman-init.sh && quarkus update"
@gsmet My output of mvn -version
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae) Maven home: /opt/idea-IU-212.5284.40/plugins/maven/lib/maven3 Java version: 21.0.3, vendor: Eclipse Adoptium, runtime: /home/paul/.jdks/temurin-21.0.3 Default locale: de_AT, platform encoding: UTF-8 OS name: "linux", version: "5.15.0-107-generic", arch: "amd64", family: "unix"
//EDIT - More information I uninstalled maven and installed again. Same effect
It's always a good idea to check whether the error is reproducible without an IDE, which in this case seems to be the problem as per this answer.
@codespearhead many thanks! This was the error. I checked my modules and they had all different java versions:
I changed to version 21 and everything worked smooth :-)
Describe the bug
I am using quarkus version 3.8.4 with JDK 21 (exactly temurin 21) for a longer time.
I wanted to upgrade to 3.11.0 because of websockets-next and run the maven command for
quarkus update
../mvnw io.quarkus.platform:quarkus-maven-plugin:3.11.0:update -N
I get the following error message: Fatal error compiling: error: invalid target release: 21
The whole stacktrace:
Expected behavior
No error message
Actual behavior
Fatal error compiling: error: invalid target release: 21
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
21.0.3
Quarkus version or git rev
3.8.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response