From 8758f43d03fd40efc0fea796fa6ae3dab25cce64 Mon Sep 17 00:00:00 2001 From: Eugene Platonov Date: Tue, 12 Nov 2024 23:26:54 -0500 Subject: [PATCH] Require JDK 17, test on JDK 21 (drop some tests having issues with JDK 17+) --- .github/workflows/ci.yml | 2 +- pom.xml | 12 ++-- .../pom.xml | 5 +- .../pom.xml | 2 +- src/it/test_skip_Scala2_10/invoker.properties | 1 - src/it/test_skip_Scala2_10/pom.xml | 45 --------------- .../src/main/scala/HelloServiceScala.scala | 6 -- .../test/scala/HelloServiceScalaTest.scala | 12 ---- src/it/test_skip_Scala2_10/validate.groovy | 12 ---- src/it/test_skip_Scala2_11/invoker.properties | 1 - src/it/test_skip_Scala2_11/pom.xml | 45 --------------- .../src/main/scala/HelloServiceScala.scala | 6 -- .../test/scala/HelloServiceScalaTest.scala | 12 ---- src/it/test_skip_Scala2_11/validate.groovy | 12 ---- .../test_skip_Scala2_12_7/invoker.properties | 1 - src/it/test_skip_Scala2_12_7/pom.xml | 55 ------------------- .../src/main/scala/HelloServiceScala.scala | 6 -- .../test/scala/HelloServiceScalaTest.scala | 12 ---- src/it/test_skip_Scala2_12_7/validate.groovy | 12 ---- src/it/test_skip_Scala3_1/pom.xml | 49 ++++++++++------- 20 files changed, 38 insertions(+), 270 deletions(-) delete mode 100644 src/it/test_skip_Scala2_10/invoker.properties delete mode 100644 src/it/test_skip_Scala2_10/pom.xml delete mode 100644 src/it/test_skip_Scala2_10/src/main/scala/HelloServiceScala.scala delete mode 100644 src/it/test_skip_Scala2_10/src/test/scala/HelloServiceScalaTest.scala delete mode 100644 src/it/test_skip_Scala2_10/validate.groovy delete mode 100644 src/it/test_skip_Scala2_11/invoker.properties delete mode 100644 src/it/test_skip_Scala2_11/pom.xml delete mode 100644 src/it/test_skip_Scala2_11/src/main/scala/HelloServiceScala.scala delete mode 100644 src/it/test_skip_Scala2_11/src/test/scala/HelloServiceScalaTest.scala delete mode 100644 src/it/test_skip_Scala2_11/validate.groovy delete mode 100644 src/it/test_skip_Scala2_12_7/invoker.properties delete mode 100644 src/it/test_skip_Scala2_12_7/pom.xml delete mode 100644 src/it/test_skip_Scala2_12_7/src/main/scala/HelloServiceScala.scala delete mode 100644 src/it/test_skip_Scala2_12_7/src/test/scala/HelloServiceScalaTest.scala delete mode 100644 src/it/test_skip_Scala2_12_7/validate.groovy diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e253936..1c69a284 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: maven: [ '3.8.8', '3.9.9' ] - java: [ '11', '17' ] + java: [ '17', '21' ] os: [ 'ubuntu-latest', 'windows-latest' ] runs-on: ${{ matrix.os }} steps: diff --git a/pom.xml b/pom.xml index 197fd2a6..027a1027 100644 --- a/pom.xml +++ b/pom.xml @@ -211,7 +211,7 @@ under the License. maven-compiler-plugin 3.13.0 - 11 + 17 -Xlint:all -Xlint:-processing @@ -272,11 +272,11 @@ under the License. maven-javadoc-plugin 3.11.1 - 11 + 17 false org.scoverage.plugin - https://docs.oracle.com/en/java/javase/11/docs/api/ + https://docs.oracle.com/en/java/javase/17/docs/api/ https://maven.apache.org/shared-archives/maven-reporting-api-${maven-reporting-api.version}/apidocs/ https://maven.apache.org/doxia/components/doxia-archives/doxia-${doxia.version}/apidocs/ https://maven.apache.org/ref/${maven.version}/apidocs/ @@ -331,7 +331,7 @@ under the License. org/scoverage/plugin/HelpMojo.java - 11 + 17 @@ -503,8 +503,8 @@ under the License. - 11 - Java 11 or later required. + 17 + Java 17 or later required. diff --git a/src/it/test_ScalaMavenPlugin_Scala2_12_JUnit/pom.xml b/src/it/test_ScalaMavenPlugin_Scala2_12_JUnit/pom.xml index 5d6e88f3..ad68f72b 100644 --- a/src/it/test_ScalaMavenPlugin_Scala2_12_JUnit/pom.xml +++ b/src/it/test_ScalaMavenPlugin_Scala2_12_JUnit/pom.xml @@ -19,7 +19,7 @@ 2.12 - 8 + 20 @@ -39,9 +39,6 @@ @project.groupId@ @project.artifactId@ - - 2.0.0 - diff --git a/src/it/test_ScalaMavenPlugin_Scala2_12_ScalaTest/pom.xml b/src/it/test_ScalaMavenPlugin_Scala2_12_ScalaTest/pom.xml index 21c7262f..7aa3a125 100644 --- a/src/it/test_ScalaMavenPlugin_Scala2_12_ScalaTest/pom.xml +++ b/src/it/test_ScalaMavenPlugin_Scala2_12_ScalaTest/pom.xml @@ -19,7 +19,7 @@ 2.12 - 19 + 20 diff --git a/src/it/test_skip_Scala2_10/invoker.properties b/src/it/test_skip_Scala2_10/invoker.properties deleted file mode 100644 index 3e51a5a6..00000000 --- a/src/it/test_skip_Scala2_10/invoker.properties +++ /dev/null @@ -1 +0,0 @@ -invoker.goals=clean verify site -e -ntp \ No newline at end of file diff --git a/src/it/test_skip_Scala2_10/pom.xml b/src/it/test_skip_Scala2_10/pom.xml deleted file mode 100644 index aa5fccd7..00000000 --- a/src/it/test_skip_Scala2_10/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 4.0.0 - - - it.scoverage-maven-plugin - integration_tests_parent - 1.0-SNAPSHOT - ../integration_tests_parent/pom.xml - - - test_skip_Scala2_10 - 1.0-SNAPSHOT - jar - Test Scoverage is Skipped for Scala 2.10 - Test Scoverage is Skipped for Scala 2.10 - - - 2.10 - 7 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - net.alchim31.maven - scala-maven-plugin - - - org.scalatest - scalatest-maven-plugin - - - @project.groupId@ - @project.artifactId@ - - - - diff --git a/src/it/test_skip_Scala2_10/src/main/scala/HelloServiceScala.scala b/src/it/test_skip_Scala2_10/src/main/scala/HelloServiceScala.scala deleted file mode 100644 index f946ee95..00000000 --- a/src/it/test_skip_Scala2_10/src/main/scala/HelloServiceScala.scala +++ /dev/null @@ -1,6 +0,0 @@ -package service - -object HelloServiceScala { - def hello = { "Hello" } - -} diff --git a/src/it/test_skip_Scala2_10/src/test/scala/HelloServiceScalaTest.scala b/src/it/test_skip_Scala2_10/src/test/scala/HelloServiceScalaTest.scala deleted file mode 100644 index cf1636c0..00000000 --- a/src/it/test_skip_Scala2_10/src/test/scala/HelloServiceScalaTest.scala +++ /dev/null @@ -1,12 +0,0 @@ -package service - -import org.scalatest.wordspec.AnyWordSpec - -class HelloServiceScalaTest extends AnyWordSpec { - - "HelloService" should { - "say hello" in { - assert(HelloServiceScala.hello == "Hello") - } - } -} diff --git a/src/it/test_skip_Scala2_10/validate.groovy b/src/it/test_skip_Scala2_10/validate.groovy deleted file mode 100644 index 9b1a115e..00000000 --- a/src/it/test_skip_Scala2_10/validate.groovy +++ /dev/null @@ -1,12 +0,0 @@ -try { - - def logFile = new File(basedir, "build.log") - def lines = logFile.readLines() - assert lines.contains("[WARNING] Skipping SCoverage execution - unsupported Scala version \"2.10.7\". Supported Scala versions are 2.12.8+, 2.13.0+ and 3.2.0+ .") - - return true - -} catch (Throwable e) { - e.printStackTrace() - return false -} diff --git a/src/it/test_skip_Scala2_11/invoker.properties b/src/it/test_skip_Scala2_11/invoker.properties deleted file mode 100644 index 3e51a5a6..00000000 --- a/src/it/test_skip_Scala2_11/invoker.properties +++ /dev/null @@ -1 +0,0 @@ -invoker.goals=clean verify site -e -ntp \ No newline at end of file diff --git a/src/it/test_skip_Scala2_11/pom.xml b/src/it/test_skip_Scala2_11/pom.xml deleted file mode 100644 index a5f4ab62..00000000 --- a/src/it/test_skip_Scala2_11/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 4.0.0 - - - it.scoverage-maven-plugin - integration_tests_parent - 1.0-SNAPSHOT - ../integration_tests_parent/pom.xml - - - test_skip_Scala2_11 - 1.0-SNAPSHOT - jar - Test Scoverage is Skipped for Scala 2.11 - Test Scoverage is Skipped for Scala 2.11 - - - 2.11 - 12 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - net.alchim31.maven - scala-maven-plugin - - - org.scalatest - scalatest-maven-plugin - - - @project.groupId@ - @project.artifactId@ - - - - diff --git a/src/it/test_skip_Scala2_11/src/main/scala/HelloServiceScala.scala b/src/it/test_skip_Scala2_11/src/main/scala/HelloServiceScala.scala deleted file mode 100644 index f946ee95..00000000 --- a/src/it/test_skip_Scala2_11/src/main/scala/HelloServiceScala.scala +++ /dev/null @@ -1,6 +0,0 @@ -package service - -object HelloServiceScala { - def hello = { "Hello" } - -} diff --git a/src/it/test_skip_Scala2_11/src/test/scala/HelloServiceScalaTest.scala b/src/it/test_skip_Scala2_11/src/test/scala/HelloServiceScalaTest.scala deleted file mode 100644 index cf1636c0..00000000 --- a/src/it/test_skip_Scala2_11/src/test/scala/HelloServiceScalaTest.scala +++ /dev/null @@ -1,12 +0,0 @@ -package service - -import org.scalatest.wordspec.AnyWordSpec - -class HelloServiceScalaTest extends AnyWordSpec { - - "HelloService" should { - "say hello" in { - assert(HelloServiceScala.hello == "Hello") - } - } -} diff --git a/src/it/test_skip_Scala2_11/validate.groovy b/src/it/test_skip_Scala2_11/validate.groovy deleted file mode 100644 index 94836baa..00000000 --- a/src/it/test_skip_Scala2_11/validate.groovy +++ /dev/null @@ -1,12 +0,0 @@ -try { - - def logFile = new File(basedir, "build.log") - def lines = logFile.readLines() - assert lines.contains("[WARNING] Skipping SCoverage execution - unsupported Scala version \"2.11.12\". Supported Scala versions are 2.12.8+, 2.13.0+ and 3.2.0+ .") - - return true - -} catch (Throwable e) { - e.printStackTrace() - return false -} diff --git a/src/it/test_skip_Scala2_12_7/invoker.properties b/src/it/test_skip_Scala2_12_7/invoker.properties deleted file mode 100644 index 3e51a5a6..00000000 --- a/src/it/test_skip_Scala2_12_7/invoker.properties +++ /dev/null @@ -1 +0,0 @@ -invoker.goals=clean verify site -e -ntp \ No newline at end of file diff --git a/src/it/test_skip_Scala2_12_7/pom.xml b/src/it/test_skip_Scala2_12_7/pom.xml deleted file mode 100644 index 54e8deaa..00000000 --- a/src/it/test_skip_Scala2_12_7/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - 4.0.0 - - - it.scoverage-maven-plugin - integration_tests_parent - 1.0-SNAPSHOT - ../integration_tests_parent/pom.xml - - - test_skip_Scala2_12_7 - 1.0-SNAPSHOT - jar - Test Scoverage is Skipped for Scala 2.12.7 - Test Scoverage is Skipped for Scala 2.12.7 - - - 2.12 - 7 - 2.0.0 - - - - - run - - 11 - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - net.alchim31.maven - scala-maven-plugin - - - org.scalatest - scalatest-maven-plugin - - - @project.groupId@ - @project.artifactId@ - - - - - - - diff --git a/src/it/test_skip_Scala2_12_7/src/main/scala/HelloServiceScala.scala b/src/it/test_skip_Scala2_12_7/src/main/scala/HelloServiceScala.scala deleted file mode 100644 index f946ee95..00000000 --- a/src/it/test_skip_Scala2_12_7/src/main/scala/HelloServiceScala.scala +++ /dev/null @@ -1,6 +0,0 @@ -package service - -object HelloServiceScala { - def hello = { "Hello" } - -} diff --git a/src/it/test_skip_Scala2_12_7/src/test/scala/HelloServiceScalaTest.scala b/src/it/test_skip_Scala2_12_7/src/test/scala/HelloServiceScalaTest.scala deleted file mode 100644 index cf1636c0..00000000 --- a/src/it/test_skip_Scala2_12_7/src/test/scala/HelloServiceScalaTest.scala +++ /dev/null @@ -1,12 +0,0 @@ -package service - -import org.scalatest.wordspec.AnyWordSpec - -class HelloServiceScalaTest extends AnyWordSpec { - - "HelloService" should { - "say hello" in { - assert(HelloServiceScala.hello == "Hello") - } - } -} diff --git a/src/it/test_skip_Scala2_12_7/validate.groovy b/src/it/test_skip_Scala2_12_7/validate.groovy deleted file mode 100644 index 594d4409..00000000 --- a/src/it/test_skip_Scala2_12_7/validate.groovy +++ /dev/null @@ -1,12 +0,0 @@ -try { - - def logFile = new File(basedir, "build.log") - def lines = logFile.readLines() - assert lines.contains("[WARNING] Skipping SCoverage execution - unsupported Scala version \"2.12.7\". Supported Scala versions are 2.12.8+, 2.13.0+ and 3.2.0+ .") - - return true - -} catch (Throwable e) { - e.printStackTrace() - return false -} diff --git a/src/it/test_skip_Scala3_1/pom.xml b/src/it/test_skip_Scala3_1/pom.xml index 9dba87a0..2626b4fa 100644 --- a/src/it/test_skip_Scala3_1/pom.xml +++ b/src/it/test_skip_Scala3_1/pom.xml @@ -23,24 +23,33 @@ scala3-library_3 - - - - org.apache.maven.plugins - maven-compiler-plugin - - - net.alchim31.maven - scala-maven-plugin - - - org.scalatest - scalatest-maven-plugin - - - @project.groupId@ - @project.artifactId@ - - - + + + run + + 17 + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + net.alchim31.maven + scala-maven-plugin + + + org.scalatest + scalatest-maven-plugin + + + @project.groupId@ + @project.artifactId@ + + + + + +