1. 安装Maven

1、下载mvn到本地,解压。

2、新建系统变量MAVEN_HOME,值指向安装目录如D:\apache-maven-3.3.9

3、path变量中增加:%MAVEN_HOME%\bin;

4、在MAVEN_HOME/conf/setting.xml中的<localRepository>标签可修改仓库位置(默认位置在C盘的用户下),如<localRepository>D:\maven\.m2\repository</localRepository>

5、验证,cmd下输入命令查看安装是否成功(需要先安装好JDK):mvn -version

2. 安装本地jar到仓库

<dependency>
<groupId>axis</groupId>
<artifactId>axis-ant</artifactId>
<version>1.4.RELEASE</version>
</dependency>

安装命令:

mvn install:install-file -Dfile=jar包的位置 -DgroupId=上面的groupId -DartifactId=上面的artifactId -Dversion=上面的version -Dpackaging=jar

例如:

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\axis.jar -DgroupId=axis -DartifactId=axis -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\axis-ant.jar -DgroupId=axis -DartifactId=axis-ant -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\commons-discovery-0.2.jar -DgroupId=axis -DartifactId=commons-discovery -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\commons-logging-1.0.4.jar -DgroupId=axis -DartifactId=commons-logging -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\jaxrpc.jar -DgroupId=axis -DartifactId=jaxrpc -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\log4j-1.2.8.jar -DgroupId=axis -DartifactId=log4j -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\saaj.jar -DgroupId=axis -DartifactId=saaj -Dversion=1.4.RELEASE -Dpackaging=jar

mvn install:install-file -Dfile=D:\Documents\Downloads\axis-bin-1_4\axis-1_4\lib\wsdl4j-1.5.1.jar -DgroupId=axis -DartifactId=wsdl4j -Dversion=1.4.RELEASE -Dpackaging=jar

仓库下生成对应的文件,如:

3. eclipse安装maven

1、Window->Preferences->Maven->Installers后选择本地的maven路径:

2、Window->Preferences->Maven->User settings选择本地仓库:

3、新建->maven project可选择动态web工程:

最新文章

  1. Ubuntu 用vsftpd 配置FTP服务器
  2. tp框架总结(二)
  3. Java中Map集合的四种访问方式(转)
  4. 删除/var/lib/docker
  5. hdu 4679 树状dp
  6. 【HTML】Beginner4:Heading
  7. Hdu3072-Intelligence System(强连通求最小值)
  8. linux mysql密码破解一张图解释
  9. 升级3.2.3后 could not find driver
  10. Inno Setup入门(十一)&mdash;&mdash;完成安装后执行某些程序
  11. Java编程入门(词汇表)
  12. C语言程序设计第二次作业—————顺序结构改
  13. UVA12265-Selling Land(单调栈)
  14. WinFormEx
  15. 牛客Wannafly9E 组一组 差分约束
  16. LintCode: Single Number II
  17. Windows键盘消息处理
  18. python for
  19. 【转】性能测试,影响 TPS 的一些因素
  20. GridFS实现原理

热门文章

  1. Elasticsearch插件清单
  2. autoHeight.vue 高度自适应
  3. this.$Message.success(&#39;提示信息&#39;) 少写了一个c 导致报错
  4. C-基础:冒泡排序
  5. Eclipse启动的时候提示:Failed to load JavaHL Library
  6. No-2.常用 Linux 命令的基本使用
  7. django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module
  8. Eclipse 总是在编译的时候卡住
  9. POJ-1190 蛋糕问题
  10. POJ-3624-背包问题