Skip to content

Commit

Permalink
Feature | Promote driver to build for JDK11 (#824)
Browse files Browse the repository at this point in the history
* Promote jre10 driver jars to jre11 build

* Update enforced Java version

* Disable Appveyor build and test scripts for now

* Update Readme
  • Loading branch information
cheenamalhotra authored Oct 26, 2018
1 parent e5e88ff commit a9bebfa
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ What's coming next? We will look into adding a more comprehensive set of tests,

## Build
### Prerequisites
* Java 10
* Java 11
* [Maven](http://maven.apache.org/download.cgi)
* An instance of SQL Server or Azure SQL Database that you can connect to.

### Build the JAR files
Maven builds automatically trigger a set of verification tests to run. For these tests to pass, you will first need to add an environment variable in your system called `mssql_jdbc_test_connection_properties` to provide the [correct connection properties](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url) for your SQL Server or Azure SQL Database instance.

To build the jar files, you must use Java 10 with Maven. You can choose to build a JDBC 4.3 compliant jar file (for use with JRE 10) and/or a JDBC 4.2 compliant jar file (for use with JRE 8).
To build the jar files, you must use Java 11 with Maven. You can choose to build a JDBC 4.3 compliant jar file (for use with JRE 11) and/or a JDBC 4.2 compliant jar file (for use with JRE 8).

* Maven:
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.
Expand Down
18 changes: 9 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ install:
cache:
- C:\Users\appveyor\.m2 -> pom.xml

# Disable build and test scripts till Java 11 is supported
build_script:
- keytool -importkeystore -srckeystore cert.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS -srcstorepass password -deststorepass password
- keytool -list -v -keystore clientcert.jks -storepass "password" > JavaKeyStore.txt
- cd..
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Pbuild43
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Pbuild42

test_script:
- mvn test -B -Pbuild43
- mvn test -B -Pbuild42
- keytool -importkeystore -srckeystore cert.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS -srcstorepass password -deststorepass password
- keytool -list -v -keystore clientcert.jks -storepass "password" > JavaKeyStore.txt
# - cd..
# - mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Pbuild43
# - mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Pbuild42
# test_script:
# - mvn test -B -Pbuild43
# - mvn test -B -Pbuild42
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ allprojects {

if (!hasProperty('buildProfile') || (hasProperty('buildProfile') && buildProfile == "build43")){

jreVersion = "jre10-preview"
jreVersion = "jre11-preview"
excludedFile = 'com/microsoft/sqlserver/jdbc/SQLServerJdbc42.java'
jar {
manifest {
attributes 'Automatic-Module-Name': 'com.microsoft.sqlserver.jdbc'
}
}
sourceCompatibility = 10
targetCompatibility = 10
sourceCompatibility = 11
targetCompatibility = 11
}

if((hasProperty('buildProfile') && buildProfile == "build42")) {
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
<activeByDefault>true</activeByDefault>
</activation>
<build>
<finalName>${project.artifactId}-${project.version}.jre10-preview</finalName>
<finalName>${project.artifactId}-${project.version}.jre11-preview</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -218,8 +218,8 @@
<excludes>
<exclude>**/com/microsoft/sqlserver/jdbc/SQLServerJdbc42.java</exclude>
</excludes>
<source>10</source>
<target>10</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -322,7 +322,7 @@
<version>3.0.5</version>
</requireMavenVersion>
<requireJavaVersion>
<version>10</version>
<version>11</version>
</requireJavaVersion>
</rules>
</configuration>
Expand Down

0 comments on commit a9bebfa

Please sign in to comment.