I am using maven. i am using sqlserver2010 database. what is the corresponding maven dependency to use com.microsoft.sqlserver.jdbc.SQLServerDriver ? Also in which repository i can find it to get downloaded?
Thanks!
I am using maven. i am using sqlserver2010 database. what is the corresponding maven dependency to use com.microsoft.sqlserver.jdbc.SQLServerDriver ? Also in which repository i can find it to get downloaded?
Thanks!
I think this is the one.
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>3.0</version>
</dependency>
download the jar from here.
To add to the repository.
mvn install:install-file -Dfile=sqljdbc4.jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=3.0 -Dpackaging=jar
Hope this helps you. Cheers.
UPDATED The new dependency edited here.
Download official driver and install it into your private, internal repository (like Nexus) as 3rd party stuff or into local repo (if you don't use Nexus) by mvn install:install-file ...
.
Alternatively use jTDS and get the artifact from Maven Central:
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>1.2.4</version>
<scope>runtime</scope>
</dependency>