maven添加sqljdbc4.jar,并引用

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

在sqljdbc4.jar的路径下,打开命令行输入:

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

对jar包进行安装,输入结果如下:

[INFO] Scanning for projects...
Downloading: http://maven.aliyun.com/nexus/content/repositories/central/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
Downloaded: http://maven.aliyun.com/nexus/content/repositories/central/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom (3.9 kB at 16 kB/s)
[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 C:\Users\pengu\Desktop\连发工具\sqljdbc4.jar to D:\Applications\apache-maven\.m2\repository\com\microsoft\sqlserver\sqljdbc4\4.0\sqljdbc4-4.0.jar
[INFO] Installing C:\Users\pengu\AppData\Local\Temp\mvninstall7139818648049157779.pom to D:\Applications\apache-maven\.m2\repository\com\microsoft\sqlserver\sqljdbc4\4.0\sqljdbc4-4.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.501 s
[INFO] Finished at: 2017-10-23T23:32:37+08:00
[INFO] Final Memory: 9M/130M
[INFO] ------------------------------------------------------------------------

在maven里引用:


    com.microsoft.sqlserver
    sqljdbc4
    4.0

 

转载于:https://my.oschina.net/u/2450666/blog/1555178

你可能感兴趣的:(maven添加sqljdbc4.jar,并引用)