正常我们在用maven搭建项目时,我们只需要将项目所需要的依赖配置到maven的配置文件pom.xml中即可,maven就可以去网上将jar包下载到配置的本地仓库中去。所以一般情况下我们是不需要手动安装jar包的。一些特殊情况除外,比如oracle的驱动jar包,由于授权问题,maven不能直接下载oracle的驱动jar包,这时就需要我们手动安装了!网上的例子也大部分以Oracle11的驱动包ojdbc6.jar为例。网上给的例子大致有两种,如下:

mvn install:install-file -Dfile=C:/ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=6.0 -Dpackaging=jar
mvn install:install-file -Dfile=ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=6.0 -Dpackaging=jar

在这里解释一下这两种写法,命令 mvn install:install-file 这是maven安装jar包开头写法 -DgroudId对应pom.xml中的groupId,-artifact对应pom.xml中的artifactId,-Dversion对应的是pom.xml的version,-Dpackaging对应的是文件格式,jar或者war。-Dfile对应的是文件位置。如果直接写-Dfile=ojdbc6.jar的话,代表dos的目录就应该是你ojdbc6.jar的目录,比如

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAG8CAIAAACOooDvAAAgAElEQVR4nO3d+W8c550n4PojiPyyiwAR4MADbIAAioHBbBICywUWVq6Z1VqZ3SDR5DAnCQbxeHzFQTaeOJh4x0ckC1FkyXHixGPHdpxrJo5jyZbsWLGsw5Ql6rZkXZSoW2ST9AiLLLg/lNVu1fF29UE2+ep58AVRXf3W+771Nqs+bJISk+eff/748ePTAMB89qc//enN0+f+w8Civve8Z8/IePLQb99QSimlVBy1c+zfn9pzpO8970lW/3aHUkoppaKply9M/cf/8Zlk9bM7lFJKKRVT/fL0ZLLmdzuVUkopFVM9fXoqefi5YaWUUkrFVE+MTiaP/H6XUkoppWKqn5ycTH70/C6llFJKxVQ/PDGZ/HjtHqWUUkrFVKtGppKfrNurlFJKzcF68OmNf/ePqz970//pbv3dP65+8OmNszbEo0+88NmPfGKgb0F367Mf+cSjT7xQtnQrjk0KeKWUUnO0brx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ASBCAh4AIiTgASBCAh4AIiTgASBCAh4AIiTgASBCAh4AIiTgASBCAh4AIiTgASBCAh4AIiTgASBCAh4AIiTgASBCAh4AIiTgASBCAh4AIiTgASBCAh4AIiTgASBCAh4AIiTgASBCAh4AIiTgASBCAh4AIiTgASBCmYCv1WpTRSYmJgQ8AMwbmYCfmpr64Ac/eM0111xzzTXXXnvthz/84cHBwfvvv39qakrAA8C8UfgO/oYbbli6dOmdd975+OOPb9iwwTt4AJhn8j+DTzP+tttue+qpp7Zt25amu5/BA8B8kgb8qVOnLly4UP99uomJiampqWeeeaae7gIeAOaTNODPnj178eLF8QaTk5Nvv/325ORkfU+tVpuYmBDwADAPpAF/4cKFNMIDJiYmBDwAzA9pwI+NjeXjvB7qjQQ8AMwDacDns3xycjL9mCHgAWAeSAM+H+RlBDwAzANpwJ9pRQsBfxwAmD8qBfw0ADDfFAf88zvOKKWUUiqmunb7iIBXSimlYisBr5RSSkVYAl4ppZSKsAS8UkopFWEJeKWUUirCunb7SHLt9hGllFJKRVa9/m97AICZUP3/vO1E+pdwxsbGLu0onPkAAACISURBVF68OBv/5j9JppPkiu3Mw7LGjQ/zG4WHV9yf2ajSZ+H8gavVxz/+8dPnJvaO1DK17kqDg4O9nimdWrhwYSeHb9u2bXp6+ioI+PRh4KmygC/c03nA1+fTmPSBCBfwwPT0tIC/mgj4ck3zsuLD/M7CN+JlNT2dPbAs1OU30IyAv3p0JeD/P8GDEs8opxJlAAAAAElFTkSuQmCC" alt="" />

如果在D盘根目录下的话,ojdbc6.jar就应该在这个目录下,才可以写-Dfile=ojdbc6.jar,否则要写明文件位置。这两种写法,在如果本地只有一个maven仓库时,都没有问题,但如果有两个或者以上仓库的时候,都没有给出说明,如果还是按照上述命令安装的话,都会安装到默认的本地仓库中去,这时我们就应该给出一个命令-Dmaven.repo.local来指定本地仓库的目录,这样的话想安装到哪个本地仓库,就由我们自己选择了,整体命令如下:

mvn install:install-file -Dmaven.repo.local=本地仓库位置 -DgroupId=指定Jar包的开发团队,一般为公司域名倒写去掉www开头。例如百度就是com.baidu等 -DartifactId=开发的项目名称 -Dversion=文件版本 -Dpackaging=文件格式 jar/war -Dfile=文件位置

所以我们在了解了命令的意思之后,自己写的话就完全没有问题了,不要每次都是直接百度copy,然后什么意思自己也不知道,那样永远也没有提高!

maven手动将jar包导入到本地仓库(支持多个仓库选择)的更多相关文章

  1. Maven手动将jar包放入本地仓库

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

  2. 用命令将本地jar包导入到本地maven仓库

    [**前情提要**]在日常开发过程中,我们总是不可避免的需要依赖某些不在中央仓库,同时也不在本地仓库中的jar包,这是我们就需要使用命令行将需要导入本地仓库中的jar包导入本地仓库,使得项目依赖本地仓 ...

  3. Maven 手动安装JAR包到本地maven仓库后,但在项目中依旧报错找不到JAR包解决方法

    本博客包含的内容: ①手动安装jar包到本地仓库: ②解决Missing artifact org.source.fastdfs:fastdfs:jar问题 .personSunflowerP { b ...

  4. Maven 手动添加 JAR 包到本地仓库

    Maven 确确实实是个好东西,用来管理项目显得很方便,但是如果是通过 Maven 来远程下载 JAR 包的话,我宿舍的带宽是4兆的,4个人共用,有时候用 Maven 来远程下载 JAR 包会显得很慢 ...

  5. maven手动添加jar包到本地仓库

    推荐几个好的 Maven 常用仓库网址:http://mvnrepository.com/http://search.maven.org/ Maven 安装 JAR 包的命令是: mvn instal ...

  6. maven 手动安装jar包

    1.问题 maven有时候在pom文件引入jar包会报错,所以可以通过手动导入jar包的方式导入. 2.解决: 通过maven命令导入jar包, mvn install:install-file -D ...

  7. 手动下载jar包导入mvn repo的方法

    转载自:http://www.360doc.com/content/19/1101/16/67125028_870487351.shtml 常用Maven仓库网址:http://mvnreposito ...

  8. Maven手动添加jar包

    有的jar在Maven中找不到则需要手动添加(如ojdbc14.jar) 方法如下: 一.将你要添加的jar包放到指定目录(在该目录下打开命令窗口) 二.输入指令:mvn install:instal ...

  9. maven手动添加jar包到pom仓库

    此处以顺丰jar包为例: mvn install:install-file -Dfile=D:\TSBrowserDownloads\SF-CSIM-EXPRESS-SDK-V1.-\SF-CSIM- ...

随机推荐

  1. 完整的ajax请求投票点赞功能的实现【数据库表一(票数)表二(ip限制重复投票)】

    前端php页面 <?php if(isset($_GET['id'])){ $id=$_GET['id']; } include('data/conn.php'); $sqls="se ...

  2. 自动装配Bean

    Spring提供了几种技巧,可以减少XML的配置数量: 自动装配(autowiring):可以减少<property>(setter注入)和<constructor-arg>( ...

  3. 三部曲一(数据结构)-1011-Sorting It All Out

    每次加入一个关系都要进行拓扑排序,不过在排序过程中需要判断是否出现多个入度为0的点,如果出现了就说明不能确定大小关系.不论出不出现多个入度为0的点拓扑排序都要进行到最后来判断是否出现环,因为一旦出现环 ...

  4. Android Drawable的9种子类 介绍

    原文: Android Drawable的9种子类 介绍   Drawable 在android里面 就是代表着图像,注意是图像 而不是图片. 图片是图像的子集.图像除了可以包含图片以外 还可以包含颜 ...

  5. CSS3卡片旋转效果

    HTML: <div id="rotate"> <div id="rotate_wrap"> <div id="fron ...

  6. CenOS7.1安装VNC——让win7远程桌面linux

    参考:http://wic.xingning.gov.cn/blog/29 https://linux.cn/article-5335-1.html 1.检查是否安装VNC, rpm -q tiger ...

  7. cell高度自动适应文章内容

    效果: 描述:表视图中生成多个不同的cell,cell的高度跟文字内容的多少有关 要求:需要自己在网上下载一个plis文件,然后修改两个标题 一 : 创建工程文件UIAutomaticCellHeig ...

  8. Micro Templating源码分析

    关于模板,写页面的人们其实一直在用,asp.net , jsp , php, nodejs等等都有他的存在,当然那是服务端的模板. 前端模板,作为前端人员肯定是多少有接触的,Handlebars.js ...

  9. JavaScript常用数组操作方法,包含ES6方法

    一.concat() concat() 方法用于连接两个或多个数组.该方法不会改变现有的数组,仅会返回被连接数组的一个副本. var arr1 = [1,2,3]; var arr2 = [4,5]; ...

  10. Java编程思想 学习笔记2

    二.一切都是对象 1.用引用操纵对象 在Java中,一切都被视为对象,但操纵的标识符实际上是对象的一个“引用”.可以将这想象成遥控器(引用)来操纵电视机(对象).另外,没有电视机,遥控器也可以单独存在 ...