搭建Maven私服
来源:互联网 发布:md5算法 编辑:程序博客网 时间:2024/06/02 00:55
本文地址:搭建Maven私服
环境信息:
Linux:CentOS release 6.5 (Final)
Nexus:2.14.2-01
1、安装服务器
1.1、下载
下载如下文件(下载地址):
1.2、解压
解压下载的文件:
tar xzvf nexus-oss-webapp-1.8.0-bundle.tar.gz
1.3、启动
进入/nexus-2.14.2-01/bin目录,看到Started Nexus OSS.就说明已经完成启动。
1.4、访问
通过查看/nexus-2.14.2-01/logs/wrapper.log日志文件,查看对应的端口号
也可以查看配置文件查看配置的端口号,application-port对应的配置即为对应的端口号,此时配置是8888,默认为8081
/nexus-2.14.2-01/conf/nexus.properties
我们可以在浏览器中通过下面URL进行访问,
默认用户名和密码:admin/admin123
http://192.168.33.107:8081/nexus/
注意: 如果无法访问,可能是防火墙没有开放8081端口
其中默认用户名密码配置文件位置在:/sonatype-work/nexus/conf/security.xml文件中
2、配置Nexus
2.1、修改配置
通过admin用户登录后
2.2、更新索引
2.3、推荐设置
2.1中的Remote Storage Location(远程仓库地址)设置是可选操作,不过,建议设置,可以加快jar下载速度。
(阿里云中央仓库地址:http://maven.aliyun.com/nexus/content/groups/public/)
3、在项目中使用私服
在pom.xml中增加repositories及pluginRepositories配置
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <repositories> <repository> <snapshots> <enabled>true</enabled> </snapshots> <id>public</id> <name>Public Repositories</name> <url>http://192.168.33.107:8081/nexus/content/groups/public/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>public</id> <name>Public Repositories</name> <url>http://192.168.33.107:8081/nexus/content/groups/public/</url> </pluginRepository> </pluginRepositories></project>
0 0
- 【Maven】centos搭建maven私服
- 搭建Maven私服
- Nexus搭建Maven私服
- 搭建Maven私服
- 搭建Maven私服
- Nexus搭建Maven私服
- 搭建Maven私服
- 搭建本地maven私服
- Nexus搭建Maven私服
- nexus 搭建maven私服
- Maven私服nexus搭建
- 搭建Maven私服
- 搭建Maven私服 - Nexus
- Nexus搭建Maven私服
- 搭建Maven私服
- Nexus搭建Maven私服
- Maven 私服nexus搭建
- Nexus搭建Maven私服
- eclipse中字母大小写转换快捷键
- 开始写博客
- 第二章 C和P,Invoker和Exporter
- Spring Task定时任务的配置和使用
- Matlab连接Mysql
- 搭建Maven私服
- Ubuntu14.04下MXNet安装
- IOCP之accept、AcceptEx、WSAAccept的区别
- iOS开发 iOS10推送必看(基础篇)
- 448. Find All Numbers Disappeared in an Array
- 【LeetCode-Java】155. Min Stack
- Omi原理-Hello Omi
- leecode 解题总结:107. Binary Tree Level Order Traversal II
- 引擎开发_ 碰撞检测_GJK 算法详细介绍