Set mssql-jdbc_auth with Maven

Viewed 986

Hi i have following Problem with mssql-jdbc_auth-<Version/Arch>.dll if i manually add it to my path it works but since i use mave this is not the way in wanna go :(.

i put following lines to my pom.xml

    <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
    <dependency>
        <groupId>com.microsoft.sqlserver</groupId>
        <artifactId>mssql-jdbc</artifactId>
        <version>8.4.1.jre14</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc_auth -->
   <dependency>
       <groupId>com.microsoft.sqlserver</groupId>
       <artifactId>mssql-jdbc_auth</artifactId>
       <version>8.4.1.x64</version>
       <type>dll</type>
   </dependency>

the dll is downloaded but seems not loaded :(, because i still run into the SQLServerException: This driver is not configured for integrated authentication Problem. How i can solve this that it just work with maven and not adding the dll on all computers to the path?

1 Answers

Without any further information: the driver is neither on PATH nor on java.library.path so System.loadLibrary() cannot load the library to access SSPI functions. Maven does not know that this is a native component which has to be present somewhere.

Related