Skip to content

Commit 98339e7

Browse files
committed
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
1 parent eca9c1c commit 98339e7

1 file changed

Lines changed: 28 additions & 7 deletions

File tree

pom.xml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,6 @@
192192
<version>2.7.3</version>
193193
<scope>runtime</scope>
194194
</dependency>
195-
196-
<dependency>
197-
<groupId>org.testng</groupId>
198-
<artifactId>testng</artifactId>
199-
<version>6.8</version>
200-
<scope>test</scope>
201-
</dependency>
202195
</dependencies>
203196

204197
<properties>
@@ -472,5 +465,33 @@
472465
</plugins>
473466
</build>
474467
</profile>
468+
<profile>
469+
<id>jdk8-only</id>
470+
<activation>
471+
<jdk>(,11)</jdk>
472+
</activation>
473+
<dependencies>
474+
<dependency>
475+
<groupId>org.testng</groupId>
476+
<artifactId>testng</artifactId>
477+
<version>7.5</version>
478+
<scope>test</scope>
479+
</dependency>
480+
</dependencies>
481+
</profile>
482+
<profile>
483+
<id>jdk11+</id>
484+
<activation>
485+
<jdk>[11,)</jdk>
486+
</activation>
487+
<dependencies>
488+
<dependency>
489+
<groupId>org.testng</groupId>
490+
<artifactId>testng</artifactId>
491+
<version>7.9.0</version>
492+
<scope>test</scope>
493+
</dependency>
494+
</dependencies>
495+
</profile>
475496
</profiles>
476497
</project>

0 commit comments

Comments
 (0)