diff --git a/docs/modules/ROOT/pages/contributing/developers.adoc b/docs/modules/ROOT/pages/contributing/developers.adoc index f1a772cae5..567e8640e5 100644 --- a/docs/modules/ROOT/pages/contributing/developers.adoc +++ b/docs/modules/ROOT/pages/contributing/developers.adoc @@ -24,6 +24,8 @@ In order to build the project, you need to comply with the following requirement * **Go version 1.16+**: needed to compile and test the project. Refer to the https://golang.org/[Go website] for the installation. * **GNU Make**: used to define composite build actions. This should be already installed or available as a package if you have a good OS (https://www.gnu.org/software/make/). +* **JDK version 17+**: the build requires JDK version 17 or above. This corresponds to the JDK version of the integration base image. +* **Maven version 3.8+**: the build requires Maven 3.8 or above. This corresponds to the version defined in the `build/Dockerfile`. * **MinGW**: needed to compile the project on Windows. Refer to the https://www.mingw-w64.org/[MinGW website] for the installation. * **Windows Subsystem for Linux (WSL)**: for running Linux binary executables natively on Windows. Refer to https://docs.microsoft.com/en-us/windows/wsl/install[WSL Website] for installation. Alternatively, you can use https://www.cygwin.com/[Cygwin] or https://www.educative.io/edpresso/how-to-install-git-bash-in-windows[Git Bash]. diff --git a/script/Makefile b/script/Makefile index 8d4cdd4996..dfddb06b04 100644 --- a/script/Makefile +++ b/script/Makefile @@ -230,7 +230,10 @@ build-platform: build build-kamel-platform ci-build: clean codegen set-version check-licenses dir-licenses build-kamel cross-compile -do-build: gotestfmt-install +check_jdk_version: + @java -version 2>&1 | awk '/version/ { split($$3, version, "."); gsub("\"", "", version[1]); if (version[1] < 17) { print "JDK version is below 17"; exit 1 }}' + +do-build: gotestfmt-install check_jdk_version ifeq ($(DO_TEST_PREBUILD),true) TEST_PREBUILD = build else