From 4c8f6c2087a1f6da12b2f0029e37178de97ed2e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Wed, 6 Mar 2024 08:44:10 +0000 Subject: [PATCH 1/2] Use Maven profiles to handle different versions of TestNG For JDK8, bump org.testng:testng to the last supported release for this version i.e. 7.5 For JDK11+, bump org.testng:testng to the latest release 7.9.0 --- pom.xml | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 268e7c0..b7a5852 100644 --- a/pom.xml +++ b/pom.xml @@ -102,7 +102,6 @@ properties for your dependencies rather than hardcoding them. --> 1.3.14 - 6.8 6.0.21 @@ -122,12 +121,6 @@ ome-common ${ome-common.version} - - org.testng - testng - ${testng.version} - test - ch.qos.logback @@ -398,5 +391,33 @@ + + jdk8-only + + (,11) + + + + org.testng + testng + 7.5 + test + + + + + jdk11+ + + [11,) + + + + org.testng + testng + 7.9.0 + test + + + From 859ea707212c4c9e91cc76a3f1086b0321c12164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Wed, 6 Mar 2024 23:21:47 +0000 Subject: [PATCH 2/2] Use profile to set testng.version depending on the Java version --- pom.xml | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index b7a5852..64fd6a2 100644 --- a/pom.xml +++ b/pom.xml @@ -121,6 +121,12 @@ ome-common ${ome-common.version} + + org.testng + testng + ${testng.version} + test + ch.qos.logback @@ -396,28 +402,18 @@ (,11) - - - org.testng - testng - 7.5 - test - - + + 7.5 + jdk11+ [11,) - - - org.testng - testng - 7.9.0 - test - - + + 7.9.0 +