Maven安装和手动安装jar到仓库
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工程:
最新文章
- Ubuntu 用vsftpd 配置FTP服务器
- tp框架总结(二)
- Java中Map集合的四种访问方式(转)
- 删除/var/lib/docker
- hdu 4679 树状dp
- 【HTML】Beginner4:Heading
- Hdu3072-Intelligence System(强连通求最小值)
- linux mysql密码破解一张图解释
- 升级3.2.3后 could not find driver
- Inno Setup入门(十一)&mdash;&mdash;完成安装后执行某些程序
- Java编程入门(词汇表)
- C语言程序设计第二次作业—————顺序结构改
- UVA12265-Selling Land(单调栈)
- WinFormEx
- 牛客Wannafly9E 组一组 差分约束
- LintCode: Single Number II
- Windows键盘消息处理
- python for
- 【转】性能测试,影响 TPS 的一些因素
- GridFS实现原理
热门文章
- Elasticsearch插件清单
- autoHeight.vue 高度自适应
- this.$Message.success(&#39;提示信息&#39;) 少写了一个c 导致报错
- C-基础:冒泡排序
- Eclipse启动的时候提示:Failed to load JavaHL Library
- No-2.常用 Linux 命令的基本使用
- django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module
- Eclipse 总是在编译的时候卡住
- POJ-1190 蛋糕问题
- POJ-3624-背包问题