maven dependency for sqlserver2010?

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!

Answers


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>

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.


Need Your Help

htaccess not redirecting with WordPress

wordpress apache .htaccess mod-rewrite

I am working on a WordPress website and thanks to some stubborn plugins, I need to rewrite URLs to make the structure neat. However, I am running into an odd issue and I cannot figure it out on my ...

Using Stasm with C# - DllImport / Interop

c# interop pinvoke

I know this question has been asked before here and here, unfortunately, the answers provided were not able to solve my problem. I'm using Stasm (http://www.milbo.users.sonic.net/stasm/index.html)