1.配置(检查)Java环境变量

2.配置(检查)maven环境变量

3.找到maven文件的根目录下的config目录,修改setting.xml文件

配置maven本地仓库

  1. <!-- localRepository
  2. | The path to the local repository maven will use to store artifacts.
  3. |
  4. | Default: ${user.home}/.m2/repository
  5. <localRepository>/path/to/local/repo</localRepository>
  6. -->
  7. <!--配置maven本地仓库-->
  8. <localRepository>D:/java/to/local/repo</localRepository>

4.使用阿里中央仓库

  1. <mirrors>
  2. <!-- mirror
  3. | Specifies a repository mirror site to use instead of a given repository. The repository that
  4. | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
  5. | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
  6. |
  7. <mirror>
  8. <id>mirrorId</id>
  9. <mirrorOf>repositoryId</mirrorOf>
  10. <name>Human Readable Name for this Mirror.</name>
  11. <url>http://my.repository.com/repo/path</url>
  12. </mirror>
  13. -->
  14. <!--使用阿里云-->
  15. <mirror>
  16. <id>nexus-aliyun</id>
  17. <mirrorOf>*</mirrorOf>
  18. <name>Nexus aliyun</name>
  19. <url>http://maven.aliyun.com/nexus/content/groups/public</url>
  20. </mirror>
  21. </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文件中配置

  1. <dependency>
  2. <groupId>com.oracle</groupId>
  3. <artifactId>ojdbc5</artifactId>
  4. <version>5.0</version>
  5. </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举例的更多相关文章

  1. 把本地的jar包安装到maven库中

    mvn install:install-file -Dfile=E:\temp\catV1\cat-client\trunk\CAT_v1.1.1\cat-consumer\target\cat-co ...

  2. 自己把jar包添加到maven仓库中

    定制库到Maven本地资源库 这里有2个案例,需要手动发出Maven命令包括一个 jar 到 Maven 的本地资源库. 要使用的 jar 不存在于 Maven 的中心储存库中. 您创建了一个自定义的 ...

  3. 本地jar包添加至Maven仓库

    Maven命令将本地的jar包方放到maven仓库中 //自定义本地的jar包在pom文件的参数 <dependency> <groupId>com.eee</group ...

  4. 将本地jar包添加到maven中

    将需要引入的jar包拷贝到maven项目的WEB-INF/lib中 在pom.xml中配置如下: <dependency> <groupId>com.xxxxx.union&l ...

  5. 将下载的本地的jar手动添加到maven仓库

    将下载到本地的JAR包手动添加到Maven仓库 常用Maven仓库网址:http://mvnrepository.com/http://search.maven.org/http://reposito ...

  6. 将jar包添加到maven仓库

    Maven资源库配置 访问http://mvnrepository.com/,在搜索栏中输入你要搜索的 JAR 包的关键字 例如下载ImpalaJDBC41这个jar包   选择你想要下载的Jar包版 ...

  7. 将本地Jar包安装到maven仓库中去

    开发中会遇到无法通过pom.xml下载jar包的情况,遇到这种情况我们可以手动在本地安装jar包到本地仓库中去,这样就可以下次再用到的话不用再次联网下载,具体以oracle的驱动包ojdbc6.jar ...

  8. 如何将jar包添加到maven本地仓库

    有时候jar包在maven仓库里找不着,那么就需要直接下载jar包,然后添加到本地仓库区. 那么如何添加呢? 如: <dependency> <groupId>com.mide ...

  9. building Utils {{ant+ivy}、{maven}}怎么样手动将下载下来的 JAR 包添加到 Maven、ivy 的本地仓库

    mvn install:install-file -Dfile=jar包的位置 -DgroupId=上面的groupId -DartifactId=上面的artifactId -Dversion=上面 ...

随机推荐

  1. Golang入门教程(二)Ubuntu16.04下安装golang(实例:Golang 定时任务管理器)

    通过两种方式安装 一.通过apt-get安装1.安装 sudo apt-get install golang 2.设置GOPATH变量 GOPATH是扩展库的目录,Go先搜索标准库目录,然后搜索GOP ...

  2. 吐血记录微信小程序授权获取Unionid及linux下使用bouncycastle解密用户数据 遇到的坑

    背景 公司小程序上线了,发现系统无法拿到一些用户的UniondID.但是上线前的测试一切都是正常的. 坑1 经排查,发现一些用户通过下面的接口无法得到unionid https://api.weixi ...

  3. PHP代码审计之命令注入

    命令注入 命令注入就是通过利用无验证变量构造特殊语句对服务器进行渗透. 注入的种类有很多,而不仅仅是SQL Injection. php常见注入有以下几种(常见:,常见!!): 命令注入 (Comma ...

  4. 中文 Tex

    \documentclass{article} \usepackage{ctex} \begin{document} 中文English \[E = m c^2\] \end{document} \d ...

  5. NPOI 读取excel的时候,时间格式的处理

    excel的时间格式是:CellType.Numeric 要判断时间还需要方法:DateUtil.IsCellDateFormatted(cell)的帮助: 示例代码如下: ICell cell = ...

  6. 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 如果列表的没有重复的话那 ...

  7. 2018-2019-2 20165237《网络对抗技术》Exp2 后门原理与实践

    2018-2019-2 20165237<网络对抗技术>Exp2 后门原理与实践 一.实践目标 使用netcat获取主机操作Shell,cron启动 使用socat获取主机操作Shell, ...

  8. springboot中使用kindeditor富文本编辑器实现博客功能

    kindeditor在之前已经用过,现在在springboot项目中使用.并且也在里面使用了图片上传以及回显等功能. 其实主要的功能是图片的处理:kindeditor对输入的内容会作为html标签处理 ...

  9. Python3的保留字

    Python3的保留字 false none true and 表示条件的并列,并且条件全部成立 as assert break class continue def del elif else ex ...

  10. Deep Mutual Learning

    论文地址: https://arxiv.org/abs/1706.00384 论文简介 该论文探讨了一种与模型蒸馏(model distillation)相关却不同的模型---即相互学习(mutual ...