SQLServer JDBC Driver and Maven

com.microsoft.sqlserver
sqljdbc41
4.1
runtime

The issue is that Maven can’t find this artifact in any of the configured maven repositories.

Unfortunately Microsoft don’t make this available via any maven repository. You need to download the jar from the Microsoft website, and then manually install it into your local maven repository.

You can do this with the following maven command:

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

Then next time you run maven on your POM it will find the artifact.

Leave a Reply

Your email address will not be published. Required fields are marked *