Skip to content

Downloading Driver Dependencies

David Engel edited this page Sep 6, 2023 · 6 revisions

Prerequisites

To get all driver dependencies, maven and an appropriate JDK version must all be installed on your machine.

Download Driver pox.xml file

  1. Browse to https://github.com/microsoft/mssql-jdbc/blob/v12.2.0/pom.xml, and select the version-appropriate tag matching your driver version.

    image

    Or go to https://raw.githubusercontent.com/microsoft/mssql-jdbc/v<Major>.<Minor>.<Revision>/pom.xml, replacing the <Major>, <Minor>, and <Revision> with the relevant numbers for your driver version. Example: https://raw.githubusercontent.com/microsoft/mssql-jdbc/v12.2.0/pom.xml

    Download/Save the pom.xml file to an empty folder.

  2. Open a command prompt and change to the folder you saved the pom.xml

    cd /path/to/where/you/saved/the/pom.xml/
    
  3. The pom.xml file contains all dependencies of the driver in the <dependencies>...</dependencies> block. Use maven to download all the dependencies to target/dependency folder.

    Please make sure to use the pom.xml associated with the version of the driver as you need the correct version of the dependent libraries for the release you are using to ensure correct functionality of the driver.

    Run the following mvn command:

    <maven_installation_path>/bin/mvn dependency:copy-dependencies
    
  4. Dependent libraries will be downloaded and copied to the target/dependency subfolder. Add them to the CLASSPATH of your user application. This could be as simple as dropping them into a lib folder, but that depends on how the application is configured.

Clone this wiki locally