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>

Maven 安装依赖包的更多相关文章

  1. maven2 com.jhlabs.imaging 01012005 maven安装jar包imaging命令

    com.jhlabs:imaging:jar:01012005 所在仓库+captcha验证码maven依赖 maven 安装jar包 到本地仓库 命令maven 3.0安装jar包 到本地仓库 co ...

  2. CodeIgniter 技巧 - 通过 Composer 安装 CodeIgniter 框架并安装依赖包

    PHP 项目中,通过 Composer 来管理各种依赖包,类似 Java 中的 Maven,或 Node 中的 npm.CodeIgniter 框架要想通过 Composer 自动加载包也很简单,步骤 ...

  3. git克隆项目到本地&&全局安装依赖项目&&安装依赖包&&启动服务

     一.安装本地开发环境 1.安装本项目 在需要保存到本地的项目的文件夹,进入到文件夹里点击右键,bash here,出现下图: 2.安装依赖项目  3.安装依赖包(进入到命令行) # 安装依赖包 $ ...

  4. 安装依赖包时--save-dev以及-save的区别及意义

    首先这样做会生成一个package.json的配置文件,并在里面增加相应的版本信息,以后运行程序时,安装依赖包可以直接 npm  install或者你有安装淘宝镜像,那就cnpm install 就一 ...

  5. Maven将依赖包、jar/war包及配置文件输出到指定目录

    使用Maven插件将依赖包 jar包 war包及配置文件输出到指定目录 写在前面 ​ 最近遇到一个朋友遇到一个项目需要将 maven 的依赖包和配置文件分开打包然后用脚本执行程序.这样的好处在于可以随 ...

  6. maven 安装jar包命令

    以 spring-context-support-3.1.0.RELEASE.jar 为例,在 @3图中已经给出这个 jar 包的 groupId,artifactId,version信息,手动安装的 ...

  7. CDH平台搭建解决离线安装依赖包的方法

    背景介绍: 1CDH开发平台在搭建的过程中,会遇到各种各样的问题,其中的各种依赖就是一个很让人头痛的问题.如果安装脚本文件出现了这种问题,那么就可以把以下的这种方法加入shell中,但是不要用yum来 ...

  8. 5.Python安装依赖(包)模块方法介绍

    1.前提条件 1). 确保已经安装需要的Python版本 2). 确保已经将Python的目录加入到环境变量中 2. Python安装包的几种常用方式 1). pip安装方式(正常在线安装) 2). ...

  9. 为什么安装了淘宝镜像,永用cnpm安装依赖包会报错,而用npm就不会?报错:cnpm : 无法加载文件 C:\Users\93457\AppData\Roaming\npm\cnpm.ps1。。。。

    cnpm - 解决 " cnpm : 无法加载文件 C:\Users\93457\AppData\Roaming\npm\cnpm.ps1,因为在此系统上禁止运行脚本.有关详细信息 ... ...

随机推荐

  1. 知识点整理-mysql怎么查看优化器优化后的sql

    背景 1.新建两张表 CREATE TABLE t1 (m1 )); CREATE TABLE t2 (m2 )); 2.插入些数据 INSERT INTO t1 VALUES(, , , 'c'); ...

  2. python-Web-flask-视图内容和模板

    2 视图内容和模板: 基本使用 #设置cookie值 @app.route('/set_cookie') def set_cookie(): response = make_response(&quo ...

  3. How To Use Rocketbots As A Dialogflow CRM

    Ever wished you had a CRM for Dialogflow? We did too, so we built one. This is a best practices arti ...

  4. 【转载】Bios报警声

    BB是报警的声音你可以根据报警声音长短,数目来判断问题出在什么地方 AWARD BIOS响铃声的一般含义是: 1短: 系统正常启动.这是我们每天都能听到的,也表明机器没有任何问题. 2短: 常规错误, ...

  5. 【Gstreamer开发】用 GStreamer 简化 Linux 多媒体开发

    原文:http://www.ibm.com/developerworks/cn/linux/l-gstreamer/ 一.基本概念 GStreamer 作为 GNOME 桌面环境推荐的流媒体应用框架, ...

  6. 【VS开发】四大图像库:OpenCV/FreeImage/CImg/CxImage

    本文转载自:http://hi.baidu.com/xiaocuiman/blog/item/6e267c2bc4b1883f5243c108.html 1.对OpenCV 的印象:功能十分的强大,而 ...

  7. curl安装问题--liburl3找不到

    问题: 大概就是,liburl3依赖没找到,或版本不对. 解决办法: 我们可以使用purge重新安装之. sudo apt-get purge libcurl3-gnutls sudo apt ins ...

  8. rpm 包安装调试缺少依赖无法安装的方法

    今天在给龙芯中标机器安装360 10.0.2001.1 版本时 发现有依赖过不去. 因为依赖关系而调过软件包: browser360-cn-stable-10.0.2001.0-1.mips64el ...

  9. Kubernetes---Service(SVC)服务

    ⒈介绍 kubernetes 通过标签选择的方式来匹配一组pod,然后提供对外访问的一种机制 一组pod可以对应到多个svc的 每一个service(svc)都可以理解为一个微服务 Service有且 ...

  10. fiddler笔记:TimeLine时间轴选项卡

    1.TimeLine选项卡介绍 TimeLine选项卡支持使用"瀑布"模型查看1~250个选中的Session.主要用于帮助性能分析和理解请求之间的关联.选项卡的主体内容是数据流视 ...