This is an automated email from the ASF dual-hosted git repository.
timoninmaxim pushed a commit to branch IGNITE-22996__epic_jdk_11
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/IGNITE-22996__epic_jdk_11 by
this push:
new 8a9f1d61086 IGNITE-23017 Remove jdk8 from build scripts (#11483)
8a9f1d61086 is described below
commit 8a9f1d61086b8774671deff4f4803b2725dddfd9
Author: Maksim Timonin <[email protected]>
AuthorDate: Tue Sep 3 17:48:11 2024 +0300
IGNITE-23017 Remove jdk8 from build scripts (#11483)
---
bin/control.bat | 8 ++++----
bin/ignite.bat | 8 ++++----
bin/include/functions.sh | 6 +++---
bin/include/jvmdefaults.bat | 19 -------------------
bin/include/jvmdefaults.sh | 19 +------------------
bin/index-reader.bat | 8 ++++----
deliveries/docker/apache-ignite-net/Dockerfile | 2 +-
deliveries/docker/apache-ignite/arm64/Dockerfile | 4 ++--
deliveries/docker/apache-ignite/run.sh | 22 ++++++++++++----------
deliveries/docker/apache-ignite/x86_64/Dockerfile | 4 ++--
modules/kubernetes/config/Dockerfile | 2 +-
.../Impl/Unmanaged/Jni/JvmDll.cs | 6 +++---
packaging/deb/control | 2 +-
packaging/rpm/apache-ignite.spec | 4 ++--
14 files changed, 40 insertions(+), 74 deletions(-)
diff --git a/bin/control.bat b/bin/control.bat
index 4174125c007..135329331e9 100644
--- a/bin/control.bat
+++ b/bin/control.bat
@@ -28,7 +28,7 @@ if "%OS%" == "Windows_NT" setlocal
if defined JAVA_HOME goto checkJdk
echo %0, ERROR:
echo JAVA_HOME environment variable is not found.
- echo Please point JAVA_HOME variable to location of JDK 1.8 or later.
+ echo Please point JAVA_HOME variable to location of JDK 11 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
@@ -37,7 +37,7 @@ goto error_finish
if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
echo %0, ERROR:
echo JAVA is not found in JAVA_HOME=%JAVA_HOME%.
- echo Please point JAVA_HOME variable to installation of JDK 1.8 or later.
+ echo Please point JAVA_HOME variable to installation of JDK 11 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
@@ -55,10 +55,10 @@ set JAVA_VER_STR=%JAVA_VER_STR:"=%
for /f "tokens=1,2 delims=." %%a in ("%JAVA_VER_STR%.x") do set
MAJOR_JAVA_VER=%%a& set MINOR_JAVA_VER=%%b
if %MAJOR_JAVA_VER% == 1 set MAJOR_JAVA_VER=%MINOR_JAVA_VER%
-if %MAJOR_JAVA_VER% LSS 8 (
+if %MAJOR_JAVA_VER% LSS 11 (
echo %0, ERROR:
echo The version of JAVA installed in %JAVA_HOME% is incorrect.
- echo Please point JAVA_HOME variable to installation of JDK 1.8 or later.
+ echo Please point JAVA_HOME variable to installation of JDK 11 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
)
diff --git a/bin/ignite.bat b/bin/ignite.bat
index 1bfa82c95ae..1368fc39a45 100644
--- a/bin/ignite.bat
+++ b/bin/ignite.bat
@@ -28,7 +28,7 @@ if "%OS%" == "Windows_NT" setlocal
if defined JAVA_HOME goto checkJdk
echo %0, ERROR:
echo JAVA_HOME environment variable is not found.
- echo Please point JAVA_HOME variable to location of JDK 1.8 or later.
+ echo Please point JAVA_HOME variable to location of JDK 11 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
@@ -37,7 +37,7 @@ goto error_finish
if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
echo %0, ERROR:
echo JAVA is not found in JAVA_HOME=%JAVA_HOME%.
- echo Please point JAVA_HOME variable to installation of JDK 1.8 or later.
+ echo Please point JAVA_HOME variable to installation of JDK 11 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
@@ -55,10 +55,10 @@ set JAVA_VER_STR=%JAVA_VER_STR:"=%
for /f "tokens=1,2 delims=." %%a in ("%JAVA_VER_STR%.x") do set
MAJOR_JAVA_VER=%%a& set MINOR_JAVA_VER=%%b
if %MAJOR_JAVA_VER% == 1 set MAJOR_JAVA_VER=%MINOR_JAVA_VER%
-if %MAJOR_JAVA_VER% LSS 8 (
+if %MAJOR_JAVA_VER% LSS 11 (
echo %0, ERROR:
echo The version of JAVA installed in %JAVA_HOME% is incorrect.
- echo Please point JAVA_HOME variable to installation of JDK 1.8 or later.
+ echo Please point JAVA_HOME variable to installation of JDK 11 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
)
diff --git a/bin/include/functions.sh b/bin/include/functions.sh
index f3cef38f626..0016e447e87 100755
--- a/bin/include/functions.sh
+++ b/bin/include/functions.sh
@@ -66,7 +66,7 @@ checkJava() {
if [ $RETCODE -ne 0 ]; then
echo $0", ERROR:"
echo "JAVA_HOME environment variable is not found."
- echo "Please point JAVA_HOME variable to location of JDK 1.8 or
later."
+ echo "Please point JAVA_HOME variable to location of JDK 11 or
later."
echo "You can also download latest JDK at http://java.com/download"
exit 1
@@ -82,10 +82,10 @@ checkJava() {
#
javaMajorVersion "$JAVA"
- if [ $version -lt 8 ]; then
+ if [ $version -lt 11 ]; then
echo "$0, ERROR:"
echo "The $version version of JAVA installed in JAVA_HOME=$JAVA_HOME
is incompatible."
- echo "Please point JAVA_HOME variable to installation of JDK 1.8 or
later."
+ echo "Please point JAVA_HOME variable to installation of JDK 11 or
later."
echo "You can also download latest JDK at http://java.com/download"
exit 1
fi
diff --git a/bin/include/jvmdefaults.bat b/bin/include/jvmdefaults.bat
index a7ffad9f236..942e9243cbb 100644
--- a/bin/include/jvmdefaults.bat
+++ b/bin/include/jvmdefaults.bat
@@ -24,25 +24,6 @@ set value=""
:: First argument is the version of the java
:: Second argument is the current value of the jvm options
:: Third value is the name of the environment variable that jvm options should
be set to
-if %java_version% == 8 (
- set value= ^
- -XX:+AggressiveOpts ^
- %current_value%
-)
-
-if %java_version% GEQ 9 if %java_version% LSS 11 (
- set value= ^
- -XX:+AggressiveOpts ^
- --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED ^
- --add-exports=java.base/sun.nio.ch=ALL-UNNAMED ^
- --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED ^
- --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED ^
- --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED
^
- --illegal-access=permit ^
- --add-modules=java.xml.bind ^
- %current_value%
-)
-
if %java_version% GEQ 11 if %java_version% LSS 14 (
set value= ^
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED ^
diff --git a/bin/include/jvmdefaults.sh b/bin/include/jvmdefaults.sh
index 5b93a547960..1bcb72733b7 100644
--- a/bin/include/jvmdefaults.sh
+++ b/bin/include/jvmdefaults.sh
@@ -24,24 +24,7 @@ getJavaSpecificOpts() {
current_value=$2
value=""
- if [ $version -eq 8 ] ; then
- value="\
- -XX:+AggressiveOpts \
- ${current_value}"
-
- elif [ $version -gt 8 ] && [ $version -lt 11 ]; then
- value="\
- -XX:+AggressiveOpts \
- --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
- --add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
- --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
- --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
-
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
- --illegal-access=permit \
- --add-modules=java.xml.bind \
- ${current_value}"
-
- elif [ "${version}" -ge 11 ] && [ "${version}" -lt 14 ]; then
+ if [ "${version}" -ge 11 ] && [ "${version}" -lt 14 ]; then
value="\
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
diff --git a/bin/index-reader.bat b/bin/index-reader.bat
index c1b1dda2fcf..afb1b89ace0 100644
--- a/bin/index-reader.bat
+++ b/bin/index-reader.bat
@@ -27,7 +27,7 @@ if "%OS%" == "Windows_NT" setlocal
if defined JAVA_HOME goto checkJdk
echo %0, ERROR:
echo JAVA_HOME environment variable is not found.
- echo Please point JAVA_HOME variable to location of JDK 1.8 or later.
+ echo Please point JAVA_HOME variable to location of JDK 11 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
@@ -36,7 +36,7 @@ goto error_finish
if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
echo %0, ERROR:
echo JAVA is not found in JAVA_HOME=%JAVA_HOME%.
- echo Please point JAVA_HOME variable to installation of JDK 1.8 or later.
+ echo Please point JAVA_HOME variable to installation of JDK 11 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
@@ -54,10 +54,10 @@ set JAVA_VER_STR=%JAVA_VER_STR:"=%
for /f "tokens=1,2 delims=." %%a in ("%JAVA_VER_STR%.x") do set
MAJOR_JAVA_VER=%%a& set MINOR_JAVA_VER=%%b
if %MAJOR_JAVA_VER% == 1 set MAJOR_JAVA_VER=%MINOR_JAVA_VER%
-if %MAJOR_JAVA_VER% LSS 8 (
+if %MAJOR_JAVA_VER% LSS 11 (
echo %0, ERROR:
echo The version of JAVA installed in %JAVA_HOME% is incorrect.
- echo Please point JAVA_HOME variable to installation of JDK 1.8 or later.
+ echo Please point JAVA_HOME variable to installation of JDK 11 or later.
echo You can also download latest JDK at http://java.com/download.
goto error_finish
)
diff --git a/deliveries/docker/apache-ignite-net/Dockerfile
b/deliveries/docker/apache-ignite-net/Dockerfile
index 050956b23e7..ac6e118e3f1 100644
--- a/deliveries/docker/apache-ignite-net/Dockerfile
+++ b/deliveries/docker/apache-ignite-net/Dockerfile
@@ -23,7 +23,7 @@ RUN mkdir -p /usr/share/man/man1
RUN apt update && apt install apt-utils -y --no-install-recommends
## Install JRE
-RUN apt update && apt install openjdk-8-jre-headless -y --no-install-recommends
+RUN apt update && apt install openjdk-11-jre-headless -y
--no-install-recommends
WORKDIR /app
diff --git a/deliveries/docker/apache-ignite/arm64/Dockerfile
b/deliveries/docker/apache-ignite/arm64/Dockerfile
index d4828acfb2c..1e1098c0ba8 100644
--- a/deliveries/docker/apache-ignite/arm64/Dockerfile
+++ b/deliveries/docker/apache-ignite/arm64/Dockerfile
@@ -15,8 +15,8 @@
# limitations under the License.
#
-# Start from Java 8 based on Ubuntu Focal Linux image (there is no Alpine
Linux image with Java 8 on ARM64)
-ARG JDK_VERSION=8
+# Start from Java 11 based on Ubuntu Focal Linux image (there is no Alpine
Linux image with Java 11 on ARM64)
+ARG JDK_VERSION=11
FROM eclipse-temurin:${JDK_VERSION}-jre-focal
# Settings
diff --git a/deliveries/docker/apache-ignite/run.sh
b/deliveries/docker/apache-ignite/run.sh
index b942f75ea0b..1c8eff2dea0 100755
--- a/deliveries/docker/apache-ignite/run.sh
+++ b/deliveries/docker/apache-ignite/run.sh
@@ -75,16 +75,18 @@ fi
#
# Add Java extra option
#
-JVM_OPTS="\
- --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
- --add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
- --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
- --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
- --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED
\
- --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED \
- --add-opens=java.base/jdk.internal.access=ALL-UNNAMED \
- --illegal-access=permit \
- ${JVM_OPTS}"
+if [ "${version}" -ge 11 ] ; then
+ JVM_OPTS="\
+ --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
+ --add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
+ --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
+ --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
+
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
+ --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED \
+ --add-opens=java.base/jdk.internal.access=ALL-UNNAMED \
+ --illegal-access=permit \
+ ${JVM_OPTS}"
+fi
DIGNITE_QUIET=$(printenv JVM_OPTS | grep -o 'IGNITE_QUIET=[^ ,]\+' | cut -d
"=" -f 2)
diff --git a/deliveries/docker/apache-ignite/x86_64/Dockerfile
b/deliveries/docker/apache-ignite/x86_64/Dockerfile
index fd302f191a5..3e1b1aebd07 100644
--- a/deliveries/docker/apache-ignite/x86_64/Dockerfile
+++ b/deliveries/docker/apache-ignite/x86_64/Dockerfile
@@ -15,8 +15,8 @@
# limitations under the License.
#
-# Start from Java 8 based on Alpine Linux image
-ARG JDK_VERSION=8
+# Start from Java 11 based on Alpine Linux image
+ARG JDK_VERSION=11
FROM eclipse-temurin:${JDK_VERSION}-jre-alpine
# Settings
diff --git a/modules/kubernetes/config/Dockerfile
b/modules/kubernetes/config/Dockerfile
index f9202513791..c8ff40b04ba 100644
--- a/modules/kubernetes/config/Dockerfile
+++ b/modules/kubernetes/config/Dockerfile
@@ -16,7 +16,7 @@
#
# Use Java 8 image as default one.
-FROM openjdk:8
+FROM openjdk:11
# Set Apache Ignite configuration file name.
ARG IGNITE_CFG_XML="example-kube.xml"
diff --git
a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/JvmDll.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/JvmDll.cs
index e30b0ab5dd5..1ea18c9cb80 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/JvmDll.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/JvmDll.cs
@@ -368,7 +368,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni
}
var file = Shell.ExecuteSafe("/usr/bin/readlink", "-f
/usr/bin/java", log: log);
- // /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
+ // /usr/lib/jvm/java-11-openjdk-amd64/jre/bin/java
if (string.IsNullOrWhiteSpace(file))
{
@@ -384,7 +384,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni
log.Debug("/usr/bin/java resolved to '{0}'", file);
var dir = Path.GetDirectoryName(file);
- // /usr/lib/jvm/java-8-openjdk-amd64/jre/bin
+ // /usr/lib/jvm/java-11-openjdk-amd64/jre/bin
if (dir == null)
{
@@ -398,7 +398,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni
yield break;
}
- // Predefined path:
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so
+ // Predefined path:
/usr/lib/jvm/java-11-openjdk-amd64/jre/lib/amd64/server/libjvm.so
yield return new KeyValuePair<string, string>(javaExec,
Path.Combine(libFolder, "amd64", "server", FileJvmDll));
diff --git a/packaging/deb/control b/packaging/deb/control
index 0c258f8ab9f..0201cd36358 100644
--- a/packaging/deb/control
+++ b/packaging/deb/control
@@ -8,7 +8,7 @@ Package: apache-ignite
Architecture: all
Section: misc
Priority: optional
-Depends: openjdk-8-jdk | openjdk-11-jdk | default-jdk | java-sdk, systemd,
passwd
+Depends: openjdk-11-jdk | default-jdk | java-sdk, systemd, passwd
Description: Apache Ignite In-Memory Computing, Database and Caching Platform
Ignite™ is a memory-centric distributed database, caching, and processing
platform for transactional, analytical, and streaming workloads, delivering
diff --git a/packaging/rpm/apache-ignite.spec b/packaging/rpm/apache-ignite.spec
index 4d854aa21a5..98fc8de2122 100644
--- a/packaging/rpm/apache-ignite.spec
+++ b/packaging/rpm/apache-ignite.spec
@@ -19,7 +19,7 @@ Group: Development/System
License: ASL 2.0
URL: https://ignite.apache.org/
Source: %{name}-%{version}-bin.zip
-Requires: java-1.8.0, chkconfig
+Requires: java-11, chkconfig
Requires(pre): shadow-utils
Provides: %{name}
AutoReq: no
@@ -45,7 +45,7 @@ in-memory speeds at petabyte scale
#
# Preinstall scripts
# $1 can be:
-# 1 - Initial install
+# 1 - Initial install
# 2 - Upgrade
#