Install jar manually into maven and Nexus

  1. 云栖社区>
  2. 博客>
  3. 正文

Install jar manually into maven and Nexus

科技小能手 2017-11-12 01:27:00 浏览487
展开阅读全文

Sometimes the maven building just needs one or more 3rd party jars, and the jars cannot be downloaded and installed automatically by Internet.


Then you can install these jars manually.


1st. Install a 3rd party jar package into maven repositor

1
mvn install:install-file -DgroupId=<jar's groupdId> -DartifactId=<artifactId> -Dpackaging=jar -Dversion=<version> -Dfile=<file location> -DgeneratePom=true

Just replace <> placeholder with your real case.


2nd. Install a 3rd party jar package into Nexus

For Nexus, you can only upload a 3rd party jar into the repository "3rd party", which is already installed as default as you setup Nexus server. Just click "3rd party" repository, and you will find a button called "Artifact upload" on the bar in the middle of the page.



本文转自 rickqin 51CTO博客,原文链接:http://blog.51cto.com/rickqin/1410642

网友评论

登录后评论
0/500
评论
科技小能手
+ 关注