diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 5ac80d2df..8e0af4e78 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -21,7 +21,6 @@ jobs: fail-fast: false matrix: include: - - { jdkVersion: "1.8.0", jvmName: "temurin:1.8.0", extraOpts: '' } - { jdkVersion: "1.11.0", jvmName: "temurin:1.11.0", extraOpts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' } - { jdkVersion: "1.17.0", jvmName: "temurin:1.17.0", extraOpts: '' } steps: diff --git a/build.sbt b/build.sbt index 5afd8925b..af8e16cff 100644 --- a/build.sbt +++ b/build.sbt @@ -198,7 +198,7 @@ lazy val `lease-kubernetes-int-test` = project publish / skip := true, libraryDependencies := Dependencies.LeaseKubernetesTest, version ~= (_.replace('+', '-')), - dockerBaseImage := "openjdk:8-jre-alpine", + dockerBaseImage := "docker.io/library/eclipse-temurin:17.0.8.1_1-jre", dockerUpdateLatest := true, dockerCommands := dockerCommands.value.flatMap { case ExecCmd("ENTRYPOINT", args @ _*) => Seq(Cmd("ENTRYPOINT", args.mkString(" "))) @@ -207,7 +207,6 @@ lazy val `lease-kubernetes-int-test` = project dockerCommands ++= Seq( Cmd("USER", "root"), Cmd("RUN", "chgrp -R 0 . && chmod -R g=u ."), - Cmd("RUN", "/sbin/apk", "add", "--no-cache", "bash", "bind-tools", "busybox-extras", "curl", "strace"), Cmd("RUN", "chmod +x /opt/docker/bin/akka-lease-kubernetes-int-test") ) ) diff --git a/integration-test/aws-api-ec2/README.md b/integration-test/aws-api-ec2/README.md index c47828d1e..a4837aa21 100644 --- a/integration-test/aws-api-ec2/README.md +++ b/integration-test/aws-api-ec2/README.md @@ -15,7 +15,7 @@ Step 1: Launch Instances From the AWS Management Console, provision a few EC2 instances (you'll need at least 2). Recommended image: Ubuntu Server 16.04. As for the instance type, this demo app runs fine even on t1.micro instances. As for the security group, for now, just select the default one and make sure you allow yourself ssh access to your instances. Once the instances are ready, -ssh into them - you may need to install Java 8 ( you can use this [guide](https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04)). +ssh into them - you may need to install Java 11 ( you can use this [guide](https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04)). Step 2: Create IAM Role diff --git a/integration-test/aws-api-ec2/src/main/resources/CloudFormation/akka-cluster.json b/integration-test/aws-api-ec2/src/main/resources/CloudFormation/akka-cluster.json index 91aa6433d..776ee40dc 100644 --- a/integration-test/aws-api-ec2/src/main/resources/CloudFormation/akka-cluster.json +++ b/integration-test/aws-api-ec2/src/main/resources/CloudFormation/akka-cluster.json @@ -63,7 +63,7 @@ "UserData": { "Fn::Base64": { "Fn::Join": ["", ["#!/bin/bash -xe\n", - "sudo yum install -y java-1.8.0\n", + "sudo yum install -y java-11-openjdk\n", "sudo yum remove -y java-1.7.0-openjdk\n", "wget ", {"Ref": "Build"}, "\n", "export PURPOSE=", {"Ref": "Purpose"}, "\n", @@ -227,4 +227,4 @@ "Description": "ASG name" } } -} \ No newline at end of file +} diff --git a/integration-test/kubernetes-api-java/pom.xml b/integration-test/kubernetes-api-java/pom.xml index 606bf15e9..2a9ed4327 100644 --- a/integration-test/kubernetes-api-java/pom.xml +++ b/integration-test/kubernetes-api-java/pom.xml @@ -15,9 +15,8 @@ - 1.8 - 1.8 UTF-8 + 11 2.8.2 10.5.1 1.2.0 @@ -74,6 +73,14 @@ + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 11 + + org.apache.maven.plugins maven-shade-plugin @@ -135,7 +142,7 @@ integration-test-kubernetes-api:1.3.3.7 - openjdk:8-jre-alpine + docker.io/library/eclipse-temurin:17.0.8.1_1-jre 8080 8558 diff --git a/integration-test/kubernetes-api/build.sbt b/integration-test/kubernetes-api/build.sbt index 9479b7396..c9e496be8 100644 --- a/integration-test/kubernetes-api/build.sbt +++ b/integration-test/kubernetes-api/build.sbt @@ -11,10 +11,9 @@ dockerCommands := } dockerExposedPorts := Seq(8080, 8558, 2552) -dockerBaseImage := "openjdk:8-jre-alpine" +dockerBaseImage := "docker.io/library/eclipse-temurin:17.0.8.1_1-jre" dockerCommands ++= Seq( Cmd("USER", "root"), - Cmd("RUN", "/sbin/apk", "add", "--no-cache", "bash", "bind-tools", "busybox-extras", "curl", "strace"), Cmd("RUN", "chgrp -R 0 . && chmod -R g=u .") ) diff --git a/integration-test/kubernetes-dns/build.sbt b/integration-test/kubernetes-dns/build.sbt index 829d37a98..e54270d45 100644 --- a/integration-test/kubernetes-dns/build.sbt +++ b/integration-test/kubernetes-dns/build.sbt @@ -10,10 +10,9 @@ dockerCommands := } dockerExposedPorts := Seq(8080, 8558, 2552) -dockerBaseImage := "openjdk:8-jre-alpine" +dockerBaseImage := "docker.io/library/eclipse-temurin:17.0.8.1_1-jre" dockerCommands ++= Seq( Cmd("USER", "root"), - Cmd("RUN", "/sbin/apk", "add", "--no-cache", "bash", "bind-tools", "busybox-extras", "curl", "strace"), Cmd("RUN", "chgrp -R 0 . && chmod -R g=u .") ) diff --git a/project/Common.scala b/project/Common.scala index 7925f2258..9da744324 100644 --- a/project/Common.scala +++ b/project/Common.scala @@ -63,14 +63,8 @@ object Common extends AutoPlugin { javacOptions ++= Seq( "-Xlint:unchecked" ), - javacOptions ++= ( - if (isJdk8) Seq.empty - else Seq("--release", "8") - ), - scalacOptions ++= ( - if (isJdk8) Seq.empty - else Seq("--release", "8") - ), + javacOptions ++= Seq("--release", "11"), + scalacOptions ++= Seq("--release", "11"), doc / javacOptions := Nil, Compile / doc / scalacOptions := scalacOptions.value ++ Seq( "-doc-title", @@ -99,6 +93,10 @@ object Common extends AutoPlugin { sonatypeProfileName := "com.lightbend" ) - private def isJdk8 = - VersionNumber(sys.props("java.specification.version")).matchesSemVer(SemanticSelector(s"=1.8")) + val isJdk11orHigher: Boolean = { + val result = VersionNumber(sys.props("java.specification.version")).matchesSemVer(SemanticSelector(">=11")) + if (!result) + throw new IllegalArgumentException("JDK 11 or higher is required") + result + } } diff --git a/project/project-info.conf b/project/project-info.conf index a451ad07d..baa207647 100644 --- a/project/project-info.conf +++ b/project/project-info.conf @@ -2,7 +2,7 @@ project-info { version: "current" scala-versions: ["2.13", "3.3"] shared-info { - jdk-versions: ["Adopt OpenJDK 8 with Hotspot", "Adopt OpenJDK 11 with Hotspot"] + jdk-versions: ["Eclipse Temurin JDK 11", "Eclipse Temurin JDK 17"] snapshots: { url: "https://oss.sonatype.org/content/repositories/snapshots/com/lightbend/akka/management/" text: "Snapshots are available"