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:

  1. mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \
  2. -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>

If there's a pom-file as well, you can install it with the following command:

  1. 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:

  1. 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. Go单引号和双引号区别

    首先做个测试,看下面那个选项是正确的: A. str:='abc'+'123'B. str:="abc"+"123"C. str:='123'+"ab ...

  2. windows10激活出现0xC0000022

    怎么办?不要担心,先找到了C:\Windows\System32\spp\store 文件夹,查看了下它的权限,如没有sppsvc,则手动添加了NT SERVICE\sppsvc 并给完全控制的权限. ...

  3. Qt——鼠标拖动缩放窗口源码

    #ifndef MOVEWIDGET_H #define MOVEWIDGET_H #include <QWidget> #include <QEvent> class Mov ...

  4. python 创建目录文件夹

    主要涉及到三个函数 1.os.path.exists(path) 判断一个目录是否存在 2.os.makedirs(path) 多层创建目录 3.os.mkdir(path) 创建目录 DEMO 直接 ...

  5. vue-cli3创建vue项目之vue.config.js配置

    module.exports = { // 基本路径 publicPath: '/', // 输出文件目录 outputDir: 'dist', // eslint-loader 是否在保存的时候检查 ...

  6. POJ 2195 Going Home 【最小费用最大流】

    题目链接:http://poj.org/problem?id=2195 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions:2715 ...

  7. (模板)poj3461(kmp模板题)

    题目链接:https://vjudge.net/problem/POJ-3461 题意:给出主串和模式串,求出模式串在主串中出现的次数. 思路:kmp板子题. AC代码: #include<cs ...

  8. confluence导出PDF格式文件不显示中文解决

    由于confluence导出PDF格式文件需要应用字体文件,下载字体文件在confluence管理员界面安装即可. 我这里使用从simhei.ttf楷体,可以从windowns主机里下载(c:/win ...

  9. Ajax方式上传文件报错"Uncaught TypeError: Illegal invocation"

    今天使用ajax上传文件时,出现了错误.数据传输的方式是通过定义formData完成的,提交的文件对象也设置为dom对象,但是还是不能发送请求.F12看到后台报了个错误:Uncaught TypeEr ...

  10. J.U.C之AQS介绍

    从JDK1.5开始,引入了并发包java.util.concurrent(J.U.C),并发容器里的同步容器AQS(AbstractQueuedSynchronizer)是J.U.C的核心,AQS底层 ...