Skip to content

Commit

Permalink
Use Maven profiles to handle different versions of TestNG
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sbesson committed Mar 5, 2024
1 parent eca9c1c commit 98339e7
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,6 @@
<version>2.7.3</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
<scope>test</scope>
</dependency>
</dependencies>

<properties>
Expand Down Expand Up @@ -472,5 +465,33 @@
</plugins>
</build>
</profile>
<profile>
<id>jdk8-only</id>
<activation>
<jdk>(,11)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.5</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>jdk11+</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.9.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

0 comments on commit 98339e7

Please sign in to comment.