本地的jar包添加到maven库中 jdbc举例
1.配置(检查)Java环境变量
2.配置(检查)maven环境变量
3.找到maven文件的根目录下的config目录,修改setting.xml文件
配置maven本地仓库
- <!-- localRepository
- | The path to the local repository maven will use to store artifacts.
- |
- | Default: ${user.home}/.m2/repository
- <localRepository>/path/to/local/repo</localRepository>
- -->
- <!--配置maven本地仓库-->
- <localRepository>D:/java/to/local/repo</localRepository>
4.使用阿里中央仓库
- <mirrors>
- <!-- mirror
- | Specifies a repository mirror site to use instead of a given repository. The repository that
- | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
- | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
- |
- <mirror>
- <id>mirrorId</id>
- <mirrorOf>repositoryId</mirrorOf>
- <name>Human Readable Name for this Mirror.</name>
- <url>http://my.repository.com/repo/path</url>
- </mirror>
- -->
- <!--使用阿里云-->
- <mirror>
- <id>nexus-aliyun</id>
- <mirrorOf>*</mirrorOf>
- <name>Nexus aliyun</name>
- <url>http://maven.aliyun.com/nexus/content/groups/public</url>
- </mirror>
- </mirrors>
5. 打开DOS窗口,执行:
mvn install:install-file -Dfile=C:/ojdbc5.jar -DgroupId=com.oracle -DartifactId=ojdbc5 -Dversion=5.0 -Dpackaging=jar -generatePom=true (如果报错就把-generatePom=true去掉)
-Dfile=c:/ojdbc5.jar 是指你ojdbc5.jar的文件位置
-DgroupId=com.oracle
-DartifactId=ojdbc5
-Dversion=5.0
指明了ojdbc5.jar的maven仓库位置。
6.在pom.xml文件中配置
- <dependency>
- <groupId>com.oracle</groupId>
- <artifactId>ojdbc5</artifactId>
- <version>5.0</version>
- </dependency>
7.右键点击项目-->Maven-->Update Project 此时就可以看到Maven Dependencies 有自己想要的jar包
在cmd中 mvn命令不能使用时 http://blog.csdn.net/u010782846/article/details/52775774
原链接 http://blog.csdn.net/maofachang/article/details/61932547
本地的jar包添加到maven库中 jdbc举例的更多相关文章
- 把本地的jar包安装到maven库中
mvn install:install-file -Dfile=E:\temp\catV1\cat-client\trunk\CAT_v1.1.1\cat-consumer\target\cat-co ...
- 自己把jar包添加到maven仓库中
定制库到Maven本地资源库 这里有2个案例,需要手动发出Maven命令包括一个 jar 到 Maven 的本地资源库. 要使用的 jar 不存在于 Maven 的中心储存库中. 您创建了一个自定义的 ...
- 本地jar包添加至Maven仓库
Maven命令将本地的jar包方放到maven仓库中 //自定义本地的jar包在pom文件的参数 <dependency> <groupId>com.eee</group ...
- 将本地jar包添加到maven中
将需要引入的jar包拷贝到maven项目的WEB-INF/lib中 在pom.xml中配置如下: <dependency> <groupId>com.xxxxx.union&l ...
- 将下载的本地的jar手动添加到maven仓库
将下载到本地的JAR包手动添加到Maven仓库 常用Maven仓库网址:http://mvnrepository.com/http://search.maven.org/http://reposito ...
- 将jar包添加到maven仓库
Maven资源库配置 访问http://mvnrepository.com/,在搜索栏中输入你要搜索的 JAR 包的关键字 例如下载ImpalaJDBC41这个jar包 选择你想要下载的Jar包版 ...
- 将本地Jar包安装到maven仓库中去
开发中会遇到无法通过pom.xml下载jar包的情况,遇到这种情况我们可以手动在本地安装jar包到本地仓库中去,这样就可以下次再用到的话不用再次联网下载,具体以oracle的驱动包ojdbc6.jar ...
- 如何将jar包添加到maven本地仓库
有时候jar包在maven仓库里找不着,那么就需要直接下载jar包,然后添加到本地仓库区. 那么如何添加呢? 如: <dependency> <groupId>com.mide ...
- building Utils {{ant+ivy}、{maven}}怎么样手动将下载下来的 JAR 包添加到 Maven、ivy 的本地仓库
mvn install:install-file -Dfile=jar包的位置 -DgroupId=上面的groupId -DartifactId=上面的artifactId -Dversion=上面 ...
随机推荐
- Golang入门教程(二)Ubuntu16.04下安装golang(实例:Golang 定时任务管理器)
通过两种方式安装 一.通过apt-get安装1.安装 sudo apt-get install golang 2.设置GOPATH变量 GOPATH是扩展库的目录,Go先搜索标准库目录,然后搜索GOP ...
- 吐血记录微信小程序授权获取Unionid及linux下使用bouncycastle解密用户数据 遇到的坑
背景 公司小程序上线了,发现系统无法拿到一些用户的UniondID.但是上线前的测试一切都是正常的. 坑1 经排查,发现一些用户通过下面的接口无法得到unionid https://api.weixi ...
- PHP代码审计之命令注入
命令注入 命令注入就是通过利用无验证变量构造特殊语句对服务器进行渗透. 注入的种类有很多,而不仅仅是SQL Injection. php常见注入有以下几种(常见:,常见!!): 命令注入 (Comma ...
- 中文 Tex
\documentclass{article} \usepackage{ctex} \begin{document} 中文English \[E = m c^2\] \end{document} \d ...
- NPOI 读取excel的时候,时间格式的处理
excel的时间格式是:CellType.Numeric 要判断时间还需要方法:DateUtil.IsCellDateFormatted(cell)的帮助: 示例代码如下: ICell cell = ...
- python 中获取列表的索引
1.index方法 list_a= [12,213,22,2,32]for a in list_a: print(list_a.index(a)) 结果: 0 1 2 3 4 如果列表的没有重复的话那 ...
- 2018-2019-2 20165237《网络对抗技术》Exp2 后门原理与实践
2018-2019-2 20165237<网络对抗技术>Exp2 后门原理与实践 一.实践目标 使用netcat获取主机操作Shell,cron启动 使用socat获取主机操作Shell, ...
- springboot中使用kindeditor富文本编辑器实现博客功能
kindeditor在之前已经用过,现在在springboot项目中使用.并且也在里面使用了图片上传以及回显等功能. 其实主要的功能是图片的处理:kindeditor对输入的内容会作为html标签处理 ...
- Python3的保留字
Python3的保留字 false none true and 表示条件的并列,并且条件全部成立 as assert break class continue def del elif else ex ...
- Deep Mutual Learning
论文地址: https://arxiv.org/abs/1706.00384 论文简介 该论文探讨了一种与模型蒸馏(model distillation)相关却不同的模型---即相互学习(mutual ...