Skip to content

Commit c3d50c2

Browse files
authored
Java 21 support update (#2229)
* Java 21 support update * Fixed typo
1 parent 0d6fe07 commit c3d50c2

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ To build the jar files, you must use minimum version of Java 11 with Maven. You
4444
* Maven:
4545
1. If you have not already done so, add the environment variable `mssql_jdbc_test_connection_properties` in your system with the connection properties for your SQL Server or SQL DB instance.
4646
2. Run one of the commands below to build a JRE 11 and newer versions compatible jar or JRE 8 compatible jar in the `\target` directory.
47-
* Run `mvn install -Pjre20`. This creates JRE 20 compatible jar in `\target` directory which is JDBC 4.3 compliant (Build with JDK 20).
47+
* Run `mvn install -Pjre21`. This creates JRE 21 compatible jar in `\target` directory which is JDBC 4.3 compliant (Build with JDK 21).
4848
* Run `mvn install -Pjre17`. This creates JRE 17 compatible jar in `\target` directory which is JDBC 4.3 compliant (Build with JDK 17+).
4949
* Run `mvn install -Pjre11`. This creates JRE 11 compatible jar in `\target` directory which is JDBC 4.3 compliant (Build with JDK 11+).
5050
* Run `mvn install -Pjre8`. This creates JRE 8 compatible jar in `\target` directory which is JDBC 4.2 compliant (Build with JDK 11+).
5151

5252
* Gradle:
5353
1. If you have not already done so, add the environment variable `mssql_jdbc_test_connection_properties` in your system with the connection properties for your SQL Server or SQL DB instance.
5454
2. Run one of the commands below to build a JRE 11 and newer versions compatible jar or JRE 8 compatible jar in the `\build\libs` directory.
55-
* Run `gradle build -PbuildProfile=jre20`. This creates JRE 20 compatible jar in `\build\libs` directory which is JDBC 4.3 compliant (Build with JDK 20).
55+
* Run `gradle build -PbuildProfile=jre21`. This creates JRE 21 compatible jar in `\build\libs` directory which is JDBC 4.3 compliant (Build with JDK 21).
5656
* Run `gradle build -PbuildProfile=jre17`. This creates JRE 17 compatible jar in `\build\libs` directory which is JDBC 4.3 compliant (Build with JDK 17+).
5757
* Run `gradle build -PbuildProfile=jre11`. This creates JRE 11 compatible jar in `\build\libs` directory which is JDBC 4.3 compliant (Build with JDK 11+).
5858
* Run `gradle build -PbuildProfile=jre8`. This creates JRE 8 compatible jar in `\build\libs` directory which is JDBC 4.2 compliant (Build with JDK 11+).

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ test {
3333
}
3434
}
3535

36-
if (!hasProperty('buildProfile') || (hasProperty('buildProfile') && buildProfile == "jre20")) {
36+
if (!hasProperty('buildProfile') || (hasProperty('buildProfile') && buildProfile == "jre21")) {
3737

38-
jreVersion = "jre20"
38+
jreVersion = "jre21"
3939
excludedFile = 'com/microsoft/sqlserver/jdbc/SQLServerJdbc42.java'
4040
jar {
4141
manifest {
4242
attributes 'Automatic-Module-Name': 'com.microsoft.sqlserver.jdbc'
4343
}
4444
}
45-
sourceCompatibility = 20
46-
targetCompatibility = 20
45+
sourceCompatibility = 21
46+
targetCompatibility = 21
4747
}
4848

4949
if (hasProperty('buildProfile') && buildProfile == "jre17") {

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,12 @@
345345
</build>
346346
</profile>
347347
<profile>
348-
<id>jre20</id>
348+
<id>jre21</id>
349349
<activation>
350350
<activeByDefault>true</activeByDefault>
351351
</activation>
352352
<build>
353-
<finalName>${project.artifactId}-${project.version}.jre20${releaseExt}</finalName>
353+
<finalName>${project.artifactId}-${project.version}.jre21${releaseExt}</finalName>
354354
<plugins>
355355
<plugin>
356356
<groupId>org.apache.maven.plugins</groupId>
@@ -360,8 +360,8 @@
360360
<excludes>
361361
<exclude>**/com/microsoft/sqlserver/jdbc/SQLServerJdbc42.java</exclude>
362362
</excludes>
363-
<source>20</source>
364-
<target>20</target>
363+
<source>21</source>
364+
<target>21</target>
365365
</configuration>
366366
</plugin>
367367
<plugin>

0 commit comments

Comments
 (0)