Maven命令行下载jar,导出依赖,导入本地jar
 2018-03-02 14:34:19   424   0   

本文最后更新于天前,文中介绍内容及环境可能已不适用.请谨慎参考.

总是要用到maven,自己做个简单记录

maven的下载安装,环境配置:

https://maven.apache.org/

 

 

  • mvn命令行下载jar包,

到pom.xml目录直接执行命令,编译,会开始下载.

 mvn clean compile

dependency-analyzer-1.4.jar (27 KB at 3.5 KB/sec)
Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/shared/maven-invoker/2.0.11/maven-invoker-2.0.11.jar
Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/shared/maven-invoker/2.0.11/maven-invoker-2.0.11.jar (29 KB at 3.5 KB/sec)
Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/3.0.9/plexus-utils-3.0.9.jar (227 KB at 27.7 KB/sec)
Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-archiver/2.3/plexus-archiver-2.3.jar (183 KB at 19.6 KB/sec)
Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-io/2.0.6/plexus-io-2.0.6.jar (57 KB at 5.8 KB/sec)

 

  • 导入本地jar包至mvn中心库
 mvn install:install-file -DgroupId=com.webLogic -DartifactId=wlfullclient  
  -Dversion=10.3 -Dpackaging=jar -Dfile=path/to/wlfullclient.jar 


导入结果
  <dependency>
              <groupId>com.webLogic</groupId> 
              <artifactId>wlfullclient</artifactId>   
             <version>10.3</version>
         </dependency>

 

  • 导出项目依赖jar

到pom.xml目录执行,导出jar到./lib目录

mvn dependency:copy-dependencies -DoutputDirectory=lib  

 

 

 

 


 2018-03-02 14:34:27 
 0

  本文基于CC BY-NC-ND 4.0 许可协议发布,作者:野生的喵喵 固定链接: 【Maven命令行下载jar,导出依赖,导入本地jar】 转载请注明



发表新的评论
{{s_uid}}   , 欢迎回来.
您的称呼(*必填):
您的邮箱地址(*必填,您的邮箱地址不会公开,仅作为有回复后的消息通知手段):
您的站点地址(选填):
留言:

∑( ° △ °|||)︴

(๑•̀ㅂ•́)و✧
<( ̄) ̄)>
[]~( ̄▽ ̄)~*
( ̄ˇ ̄)
[]~( ̄▽ ̄)~*
( ̄ˇ ̄)
╮( ̄▽ ̄)╭
( ̄ε(# ̄)
(⊙ˍ⊙)
( ̄▽ ̄)~*
∑( ° △ °|||)︴

文章分类

可能喜欢 

KxのBook@Copyright 2017- All Rights Reserved
Designed and themed by 野生的喵喵   1620940   44897