【maven】私服搭建
转自:https://www.cnblogs.com/likehua/p/4552620.html
一、软件安装
地址:http://www.sonatype.org/nexus/thank-you-for-downloading/?dl=tgz
解压:

启动:
>> nexus start
打开:http://192.9.104.17:8081/nexus/#welcome

点击右上角,使用admin/admin123(默认管理员)登陆。
管理操作面板(修改代码库、镜像、用户权限管理等):

二、系统配置
默认的nexus 配置的镜像是无法使用的,需要我们把它设置为可行的,重新构建索引。

重新构建索引:

需要修改的仓库有三处:Central、Apache Snapshots、Codehaus Snapshots
另外,releases和snapshots两处的可以自动部署属性必须勾上,如下图:

当然,你也可以通过界面来上传jar包。

三、maven环境配置
1、确保你的环境中已经部署和正确配置了maven环境,具体如果安装maven不在此教程范畴之内。
2、到你当前登录的用户下的.m2目录下,创建一个setting.xml,内容如下:
主要注意修改:servers和mirrors两处,如本例所示:
servers:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<servers> <!-- server | Specifies the authentication information to use when connecting to a particular server, identified by | a unique name within the system (referred to by the 'id' attribute below). | | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are | used together. | <server> <id>deploymentRepo</id> <username>repouser</username> <password>repopwd</password> </server> --> <!-- Another sample, using keys to authenticate. <server> <id>siteServer</id> <privateKey>/path/to/private/key</privateKey> <passphrase>optional; leave empty if not used.</passphrase> </server> --> <server> <id>snapshots</id> <username>likehua</username> <password>likehua</password> </server> <server> <id>releases</id> <username>likehua</username> <password>likehua</password> </server> <server> <id>tomcat-remote-deploy</id> <username>tomcat</username> <password>tomcat123</password> </server> </servers> |
注意此处的用户名和密码,是你nexus上创建的用户名,一般付给部署的权限。
另外就是镜像地址的配置:

1 <mirrors>
2 <!-- mirror
3 | Specifies a repository mirror site to use instead of a given repository. The repository that
4 | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
5 | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
6 |
7 <mirror>
8 <id>mirrorId</id>
9 <mirrorOf>repositoryId</mirrorOf>
10 <name>Human Readable Name for this Mirror.</name>
11 <url>http://my.repository.com/repo/path</url>
12 </mirror>
13 -->
14 <mirror>
15 <id>nexus</id>
16 <mirrorOf>*</mirrorOf>
17 <name>A Local Nexus Server</name>
18 <url>http://192.9.104.17:8081/nexus/content/groups/public/</url>
19 </mirror>
20 </mirrors>

ok,maven私服搭建配置完成。
【maven】私服搭建的更多相关文章
- maven私服搭建
一.软件安装 地址:http://www.sonatype.org/nexus/thank-you-for-downloading/?dl=tgz 解压: 启动: >> nexus sta ...
- maven私服搭建(centOS6.5)
maven的好处和私服的应用本文不赘述,私服搭建如下: MAVEN 私服搭建(centOS 6.5 环境) 1. 准备环境,搭建centOS6.5系统环境,略 2. 准备对应的软件包如下: A. ...
- maven仓库总结,maven私服搭建
配置pom.xml依赖包时在这里找包的描述: http://search.maven.org/#browse 以java为根目录. mvn archtype:generate -DgroupId=zt ...
- window Maven私服搭建——nexus
注:本文来源于 <window Maven私服搭建--nexus> Maven私服搭建--nexus 1.下载nexus https://www.sonatype.com/downlo ...
- maven仓库总结,maven私服搭建,批量mvn eclipse:eclipse
配置pom.xml依赖包时在这里找包的描述: http://search.maven.org/#browse 以java为根目录. mvn archtype:generate -DgroupId=zt ...
- maven私服搭建&使用
Maven私服搭建教程 一.nexus安装 1,解压安装包 安装包下载地址 2,以管理员身份打开cmd 3,进入到nexus的bin目录 (1) 安装:nexus install (2) 启动:nex ...
- linux7下nenux3.14的maven私服搭建和配置使用
为什么用私服,各种帖子很多,话不多说,直接奉上本博主的搭建过程. 一.环境准备:确保jdk和maven安装完成 二.下载nenux:地址:https://www.sonatype.com/downlo ...
- Nexus Maven 私服搭建
1.下载Nexus安装文件:http://www.sonatype.org/nexus/go ,目前是nexus-2.13.0-01-bundle.tar.zip这个最新版本: 2.解压到任意目录,我 ...
- linux环境下jdk 安装以及maven私服搭建
1:准备资源 linux服务器,jdk和nexus 安装包 2:网络通畅,保持windows端和linux服务器端网络通畅. 3: 安装jdk和配置环境变量 进入到 ...
- maven私服搭建nexus/windows/linux(一)
为什么要搭建nexus私服,原因很简单,有些公司都不提供外网给项目组人员,因此就不能使用maven访问远程的仓库地址,还有就是公司内部开发的一些版本的jar包,如果没有私服需要一人拷贝一份然后再自己安 ...
随机推荐
- 5000字2021最新Python基础知识第一阶段:数据类型
1 编程规范 注释 python注释也有自己的规范,在文章中会介绍到.注释可以起到一个备注的作用,团队合作的时候,个人编写的代码经常会被多人调用,为了让别人能更容易理解代码的通途,使用注释是非常有效的 ...
- Intellij idea 设置关闭自动更新
目录结构: File -> Settings- -> Appearance & Behavior -> System Settings -> Updates 把Auto ...
- LeetCode 780. Reaching Points
题目链接:https://leetcode.com/problems/reaching-points/ 题意:给定操作可以使点(x,y)变为点(x+y,y)或者点(x,x+y).现已知初始点(sx,s ...
- 字典get方法和setdesault方法,统计message中各元素的出现频次
message= 'There are moments in life when you miss someone so much that you just want to pick them fr ...
- Redux-基本概念
相关文档 1) 英文文档: https://redux.js.org/ 2) 中文文档: http://www.redux.org.cn/ 3) Git ...
- sshd_config详解
# $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $ # This is the sshd server system-wide ...
- Docker的学习体验
由于兴致使然,便想学习一点Docker技术.于是,写了这篇学习Docker的体会.笔拙,见谅. 第一件事--把网线插上 相信很多人都被官网的<Sample application>的 do ...
- list实现从大到小排序
public static void main(String[] args) { List<Integer> list=new ArrayList<Integer>(); // ...
- #使用C#winform编写渗透测试工具--子域名挖掘
使用C#winform编写渗透测试工具--子域名挖掘 这篇文章主要介绍使用C#winform编写渗透测试工具--子域名挖掘.在渗透测试中,子域名的收集十分重要,通常一个网站的主站的防御能力特别强,而他 ...
- ECShop 2.x/3.x SQL注入/任意代码执行漏洞
poc地址:https://github.com/vulhub/vulhub/blob/master/ecshop/xianzhi-2017-02-82239600/README.zh-cn.md 生 ...