安装SQL Server驱动到Maven仓库[转]
from:http://raysen.blog.51cto.com/324335/1159232
Maven does not directly support some libraries, like Microsoft’s SQL Server JDBC. This tutorial will show you how to add an external dependency to your local Maven repository. It assumes you have already installed Maven.
Download the JDBC driver for Microsoft SQL Server
- Visit the MSDN site for SQL Server and download the latest version of the JDBC driver for your operating system.
- Unzip the package
- Open a command prompt and switch into the expanded directory where the
jarfile is located. - Execute the following command. Be sure to modify the
jarfile name and version as necessary:
mvn install:install-file -Dfile=sqljdbc4.jar -Dpackaging=jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=4.0
You should see something similar to this:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install-file (default-cli) @ standalone-pom ---
[INFO] Installing /Users/claude/installers/JDBC/sqljdbc_4.0/enu/sqljdbc4.jar to /Users/claude/.m2/repository/com/microsoft/sqlserver/sqljdbc4/4.0/sqljdbc4-4.0.jar
[INFO] Installing /var/folders/c6/q1bdtq557kv54783p1g6cbsw0000gp/T/mvninstall1874482299687761721.pom to /Users/claude/.m2/repository/com/microsoft/sqlserver/sqljdbc4/4.0/sqljdbc4-4.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.208s
[INFO] Finished at: Tue Mar 13 14:07:31 EDT 2012
[INFO] Final Memory: 3M/81M
[INFO] ------------------------------------------------------------------------
Modify your POM
Include the new dependency by modifying your project’s pom.xml. Add the following dependency:
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
</dependency>
Save the pom.xml file and build the project to make sure no errors exist.
安装SQL Server驱动到Maven仓库[转]的更多相关文章
- CentOS7安装Sql Server、apache2和php72及MSSQL驱动
CentOS7安装apache2和php72及MSSQL驱动 CentOS7版本: [root@localhost ~]# cat /etc/redhat-release CentOS Linux r ...
- 在Red Hat Enterprise Linux 7.3上安装SQL Server 2017
必要条件: 1.在此快速安装过程中,您需要安装SQL Server 2017或SQL Server 2019上Red Hat Enterprise Linux (RHEL) 7.3 +.然后使用sql ...
- 在Azure虚拟机上安装SQL server
Azure虽然向用户提供SQL paas服务,但是大多数用户还是习惯在用虚拟机自己搭建SQL server,这样的好处是便于后期最大化的扩展,所以鉴于这些情况,所以觉得有必要写这篇博客. 首先,我们要 ...
- 自动化安装SQL Server+SP就那么简单
随着业务.企业规模的日益壮大,DB的数量也在不断增多,配置一台新增DB,从服务器的参数配置,磁盘阵列规划,DB安装部署,DB参数调优等等一列步骤下来,手工操作的效率变得越来越低,因为我负责的数据库近些 ...
- Win7 安装SQL SERVER 2012需要SP1补丁
在操作系统Win7上安装SQL Server 2012时,报如下错误: 也就是说SQL Server 2012如要要安装在Windows 7 上,则至少需要安装SP1补丁.否则就会弹出上面提示信息.关 ...
- win8安装SQL Server 2005问题解决方法
win8安装SQL Server 2005问题解决方法 1.正常安装任一版本的SQL Server 2005(最好安装企业版). 2.安装到SqlServer服务的时候提示启动服务失败(提示重试的时候 ...
- 安装SQL SERVER 2005出现“sql2005 执行安装向导期间出错 ”
安装sql server 2005时出现“sql2005 执行安装向导期间出错”的提示,百度找了一下,发现原来是解压时候才安装了CD1的,还有CD2的没解压安装,解压CD2安装即可
- 安装 SQL Server 2008 时提示需要删除 SQL Server 2005 Express 工具
已安装 SQL Server 2005,安装 SQL Server 2008 时提示需要删除 SQL Server 2005 Express 工具 错误提示:已安装 SQL Server 2005 E ...
- 安装SQL SERVER开启SA用户登录的方法
家庭安装SQL SERVER开启SA用户登录的方法:(切记按照网址操作完后,最后一定要在"管理工具"的"服务"里把"SQL SERVER(MSSQL ...
随机推荐
- FineUI疑难杂症
1. 导出excel操作:因为fineui里的按钮自带异步功能,所以要把 EnableAjax="false" DisableControlBeforePostBack=" ...
- jsp MVC学习笔记
Model层: 四个包: com.maker.bean存放数据库里面的字段信息. package com.maker.bean; public class User { private String ...
- (spring-第6回【IoC基础篇】)BeanDefinition——实例化Bean之前的第一大利器。
上节讲了Bean实例化的内部机制,这里再复述一遍: ResourceLoader从系统中加载XML配置信息,并由Resource来表示. BeanDefinitionReader从Resource中读 ...
- vijos 1779 国王游戏
练了一下高精度..结果敲了这么久... #include<iostream> #include<cstdio> #include<cstring> #include ...
- 【LeetCode OJ】Insertion Sort List
Problem: Sort a linked list using insertion sort. The node of the linked list is defined as: /** * D ...
- IOS 作业项目(4)步步完成 画图 程序(中续)
一,程序布局整理 前言://1,程序启动//2,程序流程框架//3,程序界面一致//4,程序界面功能, //这里只做页面的固定功能, //在首次创建界面时,我们会指定好固定事件触发前的固定方法 //至 ...
- js优化提升访问速度
一.给JS文件减肥. 有的人为了给网站增加炫目效果,往往会使用一些JS效果代码,这在上个世纪似乎还很流行,对于现在来说,最好在用户体验确实需要的情况下,使用这些东西.至于希望给自己的JS文件减肥的童鞋 ...
- Word embedding
https://en.wikipedia.org/wiki/Word_embedding 简言之,就是讲词汇或短语映射成实值特征向量.
- Linux Shell 命令
(1) 操作一个文件并对文件查询行进行切分处理 (或者1-) (2) 操作文件进行去重并显示重复次数 | sort | uniq -c (3) 查看总的汇总行数 | sort | uniq -c | ...
- Oracle执行语句跟踪(1)——使用sql trace实现语句追踪
系统上的某个接口提交数据经常超时(超过3秒),而我单独在后台数据库(Oracle)执行insert,只需要17ms.提交数据的客户端没有任何的调试日志,只能通过跟踪后台语句记录实际调用过程中的数据库执 ...