Mavenize SqlJdbc Jar

Download SQL Server jdbc driver from here.

Open command prompt and cd into the directory until you see the sqljdbc4.jar file. Run the following command, which will mavenize and install the package in your local .m2 repository.

mvn install:install-file -Dfile=sqljdbc4.jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=4.0 -Dpackaging=jar

Now add the dependency in your pom file

<dependency>

<groupId>com.microsoft.sqlserver</groupId>

<artifactId>sqljdbc4</artifactId>

<version>4.0</version>

</dependency>