This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-text.git


The following commit(s) were added to refs/heads/master by this push:
     new 2c081cf6 Build on Java 22
2c081cf6 is described below

commit 2c081cf623a0c6d78ecf8a182a3324392616d85f
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Apr 16 14:40:14 2024 -0400

    Build on Java 22
    
    Match GraalVM JS version to Java
---
 .github/workflows/maven.yml |  4 +-
 pom.xml                     | 96 +++++++++++++++++++++++++++++++++++++--------
 2 files changed, 80 insertions(+), 20 deletions(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index dc013c27..5a99db5d 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -27,11 +27,9 @@ jobs:
     continue-on-error: ${{ matrix.experimental }}
     strategy:
       matrix:
-        java: [ 8, 11, 17, 21 ]
+        java: [ 8, 11, 17, 21, 22 ]
         experimental: [false]
         include:
-          - java: 22
-            experimental: true
           - java: 23-ea
             experimental: true
 
diff --git a/pom.xml b/pom.xml
index e2bd2623..49d89da6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,8 +55,6 @@
     <commons.bytebuddy.version>1.14.13</commons.bytebuddy.version>
     <commons.mockito.version>4.11.0</commons.mockito.version>
 
-    <!-- 22.1.0 requires Java 11 -->
-    <graalvm.version>22.0.0.2</graalvm.version>
     <commons.rng.version>1.5</commons.rng.version>
 
     <japicmp.skip>false</japicmp.skip>
@@ -75,6 +73,7 @@
       commons.releaseManagerName
       commons.releaseManagerKey
     -->
+    <commons.jacoco.version>0.8.12</commons.jacoco.version>
     <!-- JaCoCo: Don't make code coverage worse than: -->
     <commons.jacoco.haltOnFailure>true</commons.jacoco.haltOnFailure>
     <commons.jacoco.classRatio>1.00</commons.jacoco.classRatio>
@@ -130,18 +129,6 @@
       <version>${commons.mockito.version}</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.graalvm.js</groupId>
-      <artifactId>js</artifactId>
-      <version>${graalvm.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.graalvm.js</groupId>
-      <artifactId>js-scriptengine</artifactId>
-      <version>${graalvm.version}</version>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-rng-simple</artifactId>
@@ -465,14 +452,89 @@
 
   <profiles>
     <profile>
-         <!-- Java 11 and up -->
-      <id>java-11-up</id>
+         <!-- Java 8-10 -->
+      <id>java-8-10</id>
+      <activation>
+               <jdk>[8,10)</jdk>
+         </activation>
+      <properties>
+        <graalvm.version>22.0.0.2</graalvm.version>
+      </properties>
+         <dependencies>
+        <dependency>
+          <groupId>org.graalvm.js</groupId>
+          <artifactId>js</artifactId>
+          <version>${graalvm.version}</version>
+          <scope>test</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.graalvm.js</groupId>
+          <artifactId>js-scriptengine</artifactId>
+          <version>${graalvm.version}</version>
+          <scope>test</scope>
+        </dependency>
+         </dependencies>
+    </profile>
+    <profile>
+         <!-- Java 11-21 -->
+      <id>java-11-21</id>
       <activation>
-               <jdk>[11,)</jdk>
+               <jdk>[11,22)</jdk>
          </activation>
       <properties>
         <graalvm.version>22.3.5</graalvm.version>
       </properties>
+         <dependencies>
+        <dependency>
+          <groupId>org.graalvm.js</groupId>
+          <artifactId>js</artifactId>
+          <version>${graalvm.version}</version>
+          <scope>test</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.graalvm.js</groupId>
+          <artifactId>js-scriptengine</artifactId>
+          <version>${graalvm.version}</version>
+          <scope>test</scope>
+        </dependency>
+         </dependencies>
+    </profile>
+    <profile>
+         <!-- Java 22 and up -->
+      <id>java-22-up</id>
+      <activation>
+               <jdk>[22,)</jdk>
+         </activation>
+      <properties>
+        <graalvm.version>24.0.0</graalvm.version>
+      </properties>
+         <dependencies>
+<!--        <dependency>-->
+<!--          <groupId>org.graalvm.polyglot</groupId>-->
+<!--          <artifactId>js</artifactId>-->
+<!--          <version>${graalvm.version}</version>-->
+<!--          <scope>test</scope>-->
+<!--        </dependency>-->
+        <!-- Workaround for issue https://github.com/oracle/graaljs/issues/813 
-->
+        <dependency>
+          <groupId>org.graalvm.js</groupId>
+          <artifactId>js-language</artifactId>
+          <version>${graalvm.version}</version>
+          <scope>test</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.graalvm.truffle</groupId>
+          <artifactId>truffle-runtime</artifactId>
+          <version>${graalvm.version}</version>
+          <scope>test</scope>
+        </dependency>        
+        <dependency>
+          <groupId>org.graalvm.js</groupId>
+          <artifactId>js-scriptengine</artifactId>
+          <version>${graalvm.version}</version>
+          <scope>test</scope>
+        </dependency>
+         </dependencies>
     </profile>
     <profile>
       <id>setup-checkout</id>

Reply via email to