maven安装及本地私有仓库搭建
来源:互联网 发布:企业优化方案 编辑:程序博客网 时间:2024/06/05 19:00
在win8.1操作系统上,通过虚拟机来访问搭建在win8.1上的nexus本地私有仓库
注:下文出现的192.168.26.1为Vmnet8虚拟网卡的地址
maven的安装
[1] Ubuntu环境下安装
a.下载并解压apache-maven-3.3.9-bin.tar.gz到/soft目录下
b.创建符号链接
$>cd /soft $>ln -s apache-maven-3.3.9 maven
c.配置maven环境变量
[/etc/environment]
M2_HOME=/soft/maven PATH=...:/soft/maven/bin
d.生效环境变量
$>source /etc/environment
[2] Windows下安装
a.下载并解压到D盘下
b.配置maven环境变量
M2_HOME=D:\apache-maven-3.3.9 PATH=...:;%M2_HOME%\bin;
在Win8.1上搭建maven本地仓库服务器
1.安装tomcat
2.安装nexus.war文件 启动服务器之后会被自动解压。注意:nexus.war文件放在win7下
a.复制nexus.war到${tomcat_home}/webapps
b.启动tomcat
c.http://localhost:8080/nexus
3.在ubuntu中配置maven的settings.xml,连接到本地仓库服务器。
[/soft/maven/conf/setting.xml]
执行之前先做个备份
$>cp setting.xml setting.xml.bak$>gedit setting.xml<?xml version="1.0" encoding="UTF-8"?><settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"><pluginGroups></pluginGroups><proxies></proxies><servers> <server> <id>releases</id> <username>admin</username> <password>admin123</password> </server> <server> <id>snapshots</id> <username>admin</username> <password>admin123</password> </server></servers><mirrors> <mirror> <id>nexus</id> <mirrorOf>*</mirrorOf> <url>http://192.168.26.1:8080/nexus/content/groups/public/</url> </mirror></mirrors><profiles> <profile> <id>nexus</id> <repositories> <repository> <id>central</id> <url>http://192.168.26.1:8080/nexus/content/repositories/central/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories><pluginRepositories> <pluginRepository> <id>central</id> <url>http://192.168.26.1:8080/nexus/content/repositories/central/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository></pluginRepositories></profile></profiles><activeProfiles> <activeProfile>nexus</activeProfile></activeProfiles></settings>
maven本地仓库服务器的配置
编辑D:\apache-tomcat-7.0.72\webapps\nexus\WEB-INF\classes\nexus.properties
nexus-work=D:/maven-repo/nexus //私有仓库中相关文件的存放地址runtime=${bundleBasedir}nexus-app=${runtime}
至此,搭建本地私有仓库服务器完成。可以在虚拟机上访问win8.1宿主机上的私有仓库
0 0
- maven安装及本地私有仓库搭建
- Maven本地私有仓库搭建
- 安装Maven并搭建Maven私有仓库
- Maven 私有仓库搭建
- 搭建Maven私有仓库
- centos7 安装docker及搭建私有仓库
- 【Maven】Nexus3搭建Maven私有仓库及使用
- Docker搭建本地私有仓库
- docker本地私有仓库搭建
- Docker搭建本地私有仓库
- 搭建maven私有仓库(Archiva)
- Nexus 搭建maven 私有仓库
- Nexus搭建Maven私有仓库
- Nexus搭建Maven私有仓库
- Nexus搭建私有maven仓库
- Nexus 搭建maven 私有仓库
- Maven 安装配置及更改本地仓库
- Maven 安装配置及更改本地仓库
- 20分钟学会正则表达式
- 10分钟搭建属于自己的ngork服务器,实现内网穿透
- [踏石留印之爬虫] 各种爬虫收集
- java -- 数组(Arrary)
- Reverse Integer算法
- maven安装及本地私有仓库搭建
- Leetcode-标签为Tree 501. Find Mode in Binary Search Tree
- vue-2.x webpack 安装vue-router 配置路由
- Android手机同时使用Wi-Fi和数据流量
- 使用Setup Factory 给应用程序打包
- 股票交易 动态规划 分治算法
- MySQL order by实现原理分析和Filesort优化
- spring源码-3-bean实例化
- floyd算法--一个人的旅行