`

maven添加非官方jar包到本地库(maven: install an external jar into local maven repository)

阅读更多

解决了我的问题,内容如下:

 

Sometimes, you project will have dependency on a jar which is not in official maven repository , and maybe it is propriety jar file which will never be part of maven repository . In this case, you have to put it to your local repository your self to solve the dependency.

There is a install plug in to do this job, which is something like:

mvn install:install-file 
-DgroupId=<your_group_name>  
-DartifactId=<your_artifact_name>  
-Dversion=<snapshot>  
-Dfile=<path_to_your_jar_file>  
-Dpackaging=jar 
-DgeneratePom=true
 

For example, you want to install the danga’s memcached client plugin, you can do:

mvn install:install-file 
-DgroupId=com.danga 
-DartifactId=memcached 
-Dversion=2.0.1 
-Dfile=java_memcached-release_2.0.1.jar 
-Dpackaging=jar \-DgeneratePom=true

This will add the memcache jar into your local Maven2 repository under groupId com.danga and artifactId memcached, you can then edit your pom.xml adding this dependency.

However, the maven eclipse can not recognize it since it always search from public repository .

1
0
分享到:
评论
1 楼 ouyangshixiong 2011-07-12  
However, the maven eclipse can not recognize it since it always search from public repository .

这个问题怎么解决?如果我项目依赖包install在本地repository.而我想用mvn eclipse 命令构建开发环境。

相关推荐

    从网络maven库上面下载jar包到本地仓库的工具

    2、解决了本地仓库里缺少jar包手动导入jar包的麻烦 3、本地需要安装jdk1.7及以上 4、需要设置maven的环境变量,默认M2_HOME 5、直接将maven的jar包的依赖贴到文本框中,点击导入,就可以导入到你本地的maven仓库中

    maven_repository .zip

    有时在你的构建过程中,需要将第三方jar包添加到本地仓库中,因为它并存在于像Maven中央仓库或其它的公共仓库中。为了让Maven能够正确获取到jar包,第三方jar包必须放置到本地仓库的正确位置上。Maven已经提供了...

    maven-repository仓库

    maven仓库所需要的jar包,包含完整的内容,可以去看一下简绍(https://blog.csdn.net/Fly_tom/article/details/81874197),由于csdn网站上传文件的限制,这个只是一部分,另一部分:...

    清理本地和远程maven仓库repository中的无效或者垃圾版本文件lastUpdated、_remote等

    2、使用方法1:在本地仓库repository文件夹中右键,打开Git Bahs Here命令(本地需要下载Git工具),然后用文本打开本工具,复制其中的命令“find xxx” 粘贴到Git Bahs Here中,回车执行即可清理无效文件。...

    maven-repository-metadata-3.0.jar

    maven-repository-metadata-3.0.jar

    maven依赖本地jar包

    maven依赖本地非repository中的jar包

    maven私库nexus批量上传jar工具

    go语言写的一个工具,用于批量上传本地仓库的jar到nexus私库。目前只有exe没有生成linux脚本。文件夹中有使用说明。 .\mvnDeployTool.exe -r C:\\Users\\yyc\\.m2\\repository\\org\\apache\\maven -s D:\devEnv\...

    maven依赖库 - maven_repository.zip

    maven依赖库,里面含有较为全面的jar包,如果maven无法自动下载依赖库,可手动导入依赖库;该压缩包解压后可以直接在maven项目中指定路径使用。

    Maven的Dependency详解

    用命令自动安装jar包到本地repository里面去 mvn install:install-file -D groupId=org.zenika.widget -D artifactId=gwt-datepicker -D version=r29 -D packaging=jar -D file=C:\gwt-datepicker-r29.jar 命令参数...

    清理本地maven仓库下载不完整的jar包批处理文件

    帮助你清理maven仓库下载不完整的jar包 , REPOSITORY_PATH= 后面写你想清理的maven仓库的地址。之后双击bat文件就行了

    maven jar包

    maven-repository-metadata-3.2.1-sources.jar maven-resources-plugin-2.6.jar maven-settings-3.2.1-sources.jar maven-settings-builder-3.2.1-sources.jar maven-shared-incremental-1.1.jar maven-shared-utils...

    maven local repository

    用JNI安装tesseract,maven install后生成的local repository

    jeesite 框架maven数据仓库包

    jeesite 框架maven数据仓库包,有这个包指向maven,断网也可以用

    java使用ffmpeg的jar包

    导入这个jar包后就可以使用ffmpeg的音频转码 mvn install:install-file -Dfile=E:\jave-1.0.2.jar //包的输入路径 ... //执行完成后 jar 会放入maven 仓库中 maven/repository/jave/jave/1.0.2/

    Maven2 来完成Struts2.0项目的打包实例

    mvn install:install-file -D groupId=org.zenika.widget -D artifactId=gwt-datepicker -D version=r29 -D packaging=jar -D file=C:\gwt-datepicker-r29.jar 命令参数详解: mvn install:install-file: maven 安装...

    kettle7.2和8.2相关maven依赖包仓库

    kettle是国外开源的一款ETL集成工具,其最新版8.2版本改为了maven项目,由于其maven仓库下载实在太慢,这里提供了我费了一两天才下载好的依赖包,直接解压放在本地仓库即可。方便好使,好用的给个五星好评。

    settings.xml,本地maven仓库配置

    settings.xml,本地maven仓库配置,注意:D:\maven\repository为我本地的maven仓库路径,改成你的。 settings.xml,本地maven仓库配置,注意:D:\maven\repository为我本地的maven仓库路径,改成你的。 settings.xml...

    Maven: 仓库搜索服务

    如何输入关键字,寻找需要依赖jar的MAVEN坐标,需要提供确切的MAVEN坐标 1.Sonatype Nexus 地址: https://repository.sonatype.org 2. Jarvana 地址: http://www.jarvana.com/jarvana 3.MVNbrowser 地址: ...

    Hadoop Maven repository本地库

    Hadoop Maven repository本地库 下载后直接解压就能用。。。。。

    java-maven本地仓库包大全

    java-maven-repository本地仓库包大全,这是本人整理的比较全的,分享出来

Global site tag (gtag.js) - Google Analytics