Maven adds the JDBC driver package for SQL Server

Source: Internet
Author: User
Tags microsoft website

There is no JDBC driver for SQL Server in http://search.maven.org/, so you need to install the SQLJDBC jar package locally, and then introduce it in the POM

Step 1

Download SQLJDBC jar package on Microsoft website: http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774

This download has 4.0 version

Space download Connection Sharing: Https://yunpan.cn/cv3TjJqDZM7zu access password D6BB

Step 2

Install the jar package locally via the MAVEN command.

In the folder with the Sqljdbc4.jar package, open the Command window by shift+ Right-click here, then execute the following MAVEN command

MVN install:install-file-dfile=sqljdbc4.jar-dpackaging=jar-dgroupid=com.microsoft.sqlserver-dartifactid= sqljdbc4-dversion=4.0

Command explanation: mvn install:install-file-dfile= "The absolute path of the jar package"-dpackaging= "file Packaging method"-dgroupid=groupid name-dartifactid=artifactid name- Dversion=jar version

Step 3

Introduction of local jar packages in Pom.xml

<dependency>    <groupId>com.microsoft.sqlserver</groupId>    <ARTIFACTID>SQLJDBC4 </artifactId>    <version>4.0</version></dependency>

Maven adds the JDBC driver package for SQL Server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.