maven无法下载sqlserver驱动sqljdbc41.jar
原创    everyBody    发表于:2018-11-12 16:49:30
  阅读 :98   收藏   编辑

手动下载

http://www.microsoft.com/en-us/download/details.aspx?id=11774 

下载sqljdbc_6.0.8112.200_enu.tar.gz,将sqljdbc41.jar解压到D

cmd执行

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

输出

C:\Users\Administrator>mvn install:install-file -Dfile=D:/sqljdbc41.jar -DgroupI
d=com.microsoft.sqlserver -DartifactId=sqljdbc41 -Dversion=4.0 -Dpackaging=jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom
---
[INFO] Installing D:\sqljdbc41.jar to G:\work\maven_repo\com\microsoft\sqlserver
\sqljdbc41\4.0\sqljdbc41-4.0.jar
[INFO] Installing C:\Users\ADMINI~1\AppData\Local\Temp\mvninstall760719744610301
1456.pom to G:\work\maven_repo\com\microsoft\sqlserver\sqljdbc41\4.0\sqljdbc41-4
.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.925 s
[INFO] Finished at: 2018-11-12T16:45:56+08:00
[INFO] Final Memory: 7M/115M
[INFO] ------------------------------------------------------------------------

pom.xml

 <!--sqljdbc4-->
      <dependency>
          <groupId>com.microsoft.sqlserver</groupId>
          <artifactId>sqljdbc41</artifactId>
          <version>4.0</version>
 </dependency


评论
条评论