Guide to installing 3rd party JARs
Although rarely, but sometimes you will have 3rd party JARs that you need to put in your local repository for use in your builds, since they don't exist in any public repository like Maven Central. The JARs must be placed in the local repository in the correct place in order for it to be correctly picked up by Apache Maven. To make this easier, and less error prone, we have provide a goal in the maven-install-plugin which should make this relatively painless. To install a JAR in the local repository use the following command:
mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \
-DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
If there's a pom-file as well, you can install it with the following command:
mvn install:install-file -Dfile=<path-to-file> -DpomFile=<path-to-pomfile>
With version 2.5 of the maven-install-plugin it gets even better. If the JAR was built by Apache Maven, it'll contain a pom.xml in a subfolder of the META-INF directory, which will be read by default. In that case, all you need to do is:
mvn install:install-file -Dfile=<path-to-file>
由于oracle商业版权问题,maven不能通过中心资源库直接下载jar包,如果想要使用jar包,需要手动处理。
第一步:将ojdbc6.jar放到任意目录下,例如:D:\download\oracle11g驱动jar包
第二步:(需配置及安装maven,可通过mvn -version验证是否安装)在cmd命令中执行
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.1.0.7.0 -Dpackaging=jar -Dfile=D:\download\ojdbc6.jar
这样就将jdbc驱动安装到maven的本地资源库中,进入maven本地资源库:D:\Maven\localRepository,可以看到已经将ojdbc6.jar打包到本地资源库中。
第三步:在所需要的工程中的pom.xml中添加dependency
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.1.0.7.0</version>
</dependency>
即完成了maven jar包的部署
Guide to installing 3rd party JARs的更多相关文章
- Maven 安装依赖包
Guide to installing 3rd party JARs Although rarely, but sometimes you will have 3rd party JARs that ...
- Spring Boot Reference Guide
Spring Boot Reference Guide Authors Phillip Webb, Dave Syer, Josh Long, Stéphane Nicoll, Rob Winch, ...
- Tomcat Clustering - A Step By Step Guide --转载
Tomcat Clustering - A Step By Step Guide Apache Tomcat is a great performer on its own, but if you'r ...
- P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1
P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1 May ...
- Installing FIM 2010 R2 SP1 Portal on SharePoint Foundation 2013
http://www.fimspecialist.com/fim-portal/installing-fim-2010-r2-sp1-portal-on-sharepoint-foundation-2 ...
- 【转】Installing OpenCV on Debian Linux
In this post I will describe the process of installing OpenCV(both versions 2.4.2 and 2.4.3) on Debi ...
- (转) [it-ebooks]电子书列表
[it-ebooks]电子书列表 [2014]: Learning Objective-C by Developing iPhone Games || Leverage Xcode and Obj ...
- samba完美安装
感觉是一个相当强大的东西. Samba是在Linux和UNIX系统上实现SMB协议的一个免费软件.它为局域网内的不同计算机之间提供文件及打印机等资源的共享服务.为客户机/服务器型协议,客户机通过该协议 ...
- 如何使用Unix/Linux grep命令——磨刀不误砍柴工系列
http://man.linuxde.net/grep ---------------------------------------------------- 如何使用Unix/Linux gre ...
随机推荐
- 唯一索引 && 主键索引
唯一索引唯一索引不允许两行具有相同的索引值. 如果现有数据中存在重复的键值,则大多数数据库都不允许将新创建的唯一索引与表一起保存. 当新数据将使表中的键值重复时,数据库也拒绝接受此数据.例如,如果在 ...
- 关于CMD中延迟环境变量嵌套的实现方法
在我昨天做的一个bat中(自动按日期重命名文件名)涉及到这方面的问题 以前涉及到这里时就想别的办法替代过去,今天好好扒出来说说: 实现变量嵌套的2种方法: 1,使用call实现变量嵌套 变量嵌套:即在 ...
- 知名第三方编译版tete009 Firefox 24.0
Firefox除了官方版本上还有许多由爱好者自己编译修改的第三方版本. 其中 tete009 是十分流行的一个版本,目前tete009 Firefox 24.0 版本发布. tete009版Firef ...
- L188
This is the view from the instrument deployment camera of InSight, America’s latest probe to Mars, w ...
- contentType 'text/xml; charset=UTF-8' conflicts问题
Resin升级到3.1.3后,有同事发现原来在Resin 3.0.xx下成功运行的部分jsp文件(输出xml格式文件)编译出错: 1234567 500 Servlet Exception XXXXX ...
- 二、深度解析HTML5之视频播放和音频播放
一:视频播放 传统的视频音频播放是通过flash插件的形式完成,不是所有的浏览器都安装了flash插件,而且手机端不支持flash,这就导致视频和音频的播放会有很大的麻烦. 于是,HTML5增加音频和 ...
- SVN的 安装
关于svn的安装,如图分别是服务端和客户端 下载地址:http://subversion.apache.org/packages.html 1.双击VisualSVN,点下一步,选择目录,就可以,很简 ...
- 创建一个新的进程os.fork
import os pid = os.fork()功能:创建新的进程参数:无返回值:失败返回一个负数 成功:在原有进程中返回一个新的进程的PID号 在新的进程中返回0 *子进程会复制父进程全部代码段, ...
- 树的直径证明+HDU2196
首先把无向图变成一棵树,直径肯定由叶子组成. 有以下两种情况: 第一种:经过根节点,则找两个最远的叶子肯定是直径,也就是B+D. 第二种:不经过根节点,则目标的两个叶子肯定有一个不为根的公共祖先,如红 ...
- Windows下Java JDK8配置环境变量
JDK最新版已经出到了jdk8u60,下载安装完成后,还需要配置环境变量,下面小编就给大家分享下jdk 8.0的环境变量配置教程,希望大家喜欢. jdk8.0环境变量配置教程 右键选择 计算机→属性→ ...