你的位置:首页 > Java教程

[Java教程]针对eclipse的maven Missing artifact com.microsoft.sqlserver:slqjdbc4:jar:4.0


maven 中添加sqlserver 出错,报错内容 

maven Missing artifact com.microsoft.sqlserver

解决方法这里先下载好jar包 ,然后maven命令执行。

将下载的好的jar包放在工程下面

在eclipse中执行maven命令

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

 

执行:

[INFO]                                     [INFO] ------------------------------------------------------------------------[INFO] Building example Maven Webapp 0.0.1-SNAPSHOT[INFO] ------------------------------------------------------------------------[INFO] [INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ example ---[INFO] Installing E:\workspace\example\sqljdbc4.jar to C:\Users\tony\.m2\repository\com\microsoft\sqlserver\sqljdbc4\4.0\sqljdbc4-4.0.jar[INFO] Installing C:\Users\tony\AppData\Local\Temp\mvninstall7821427790351823309.pom to C:\Users\tony\.m2\repository\com\microsoft\sqlserver\sqljdbc4\4.0\sqljdbc4-4.0.pom[INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESS[INFO] ------------------------------------------------------------------------[INFO] Total time: 0.448 s[INFO] Finished at: 2015-08-22T11:06:52+08:00[INFO] Final Memory: 7M/153M[INFO] ------------------------------------------------------------------------