转自: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】私服搭建的更多相关文章

  1. maven私服搭建

    一.软件安装 地址:http://www.sonatype.org/nexus/thank-you-for-downloading/?dl=tgz 解压: 启动: >> nexus sta ...

  2. maven私服搭建(centOS6.5)

    maven的好处和私服的应用本文不赘述,私服搭建如下: MAVEN 私服搭建(centOS 6.5 环境) 1.  准备环境,搭建centOS6.5系统环境,略 2.  准备对应的软件包如下: A. ...

  3. maven仓库总结,maven私服搭建

    配置pom.xml依赖包时在这里找包的描述: http://search.maven.org/#browse 以java为根目录. mvn archtype:generate -DgroupId=zt ...

  4. window Maven私服搭建——nexus

    注:本文来源于 <window   Maven私服搭建--nexus> Maven私服搭建--nexus 1.下载nexus https://www.sonatype.com/downlo ...

  5. maven仓库总结,maven私服搭建,批量mvn eclipse:eclipse

    配置pom.xml依赖包时在这里找包的描述: http://search.maven.org/#browse 以java为根目录. mvn archtype:generate -DgroupId=zt ...

  6. maven私服搭建&使用

    Maven私服搭建教程 一.nexus安装 1,解压安装包 安装包下载地址 2,以管理员身份打开cmd 3,进入到nexus的bin目录 (1) 安装:nexus install (2) 启动:nex ...

  7. linux7下nenux3.14的maven私服搭建和配置使用

    为什么用私服,各种帖子很多,话不多说,直接奉上本博主的搭建过程. 一.环境准备:确保jdk和maven安装完成 二.下载nenux:地址:https://www.sonatype.com/downlo ...

  8. Nexus Maven 私服搭建

    1.下载Nexus安装文件:http://www.sonatype.org/nexus/go ,目前是nexus-2.13.0-01-bundle.tar.zip这个最新版本: 2.解压到任意目录,我 ...

  9. linux环境下jdk 安装以及maven私服搭建

    1:准备资源      linux服务器,jdk和nexus  安装包    2:网络通畅,保持windows端和linux服务器端网络通畅.     3: 安装jdk和配置环境变量      进入到 ...

  10. maven私服搭建nexus/windows/linux(一)

    为什么要搭建nexus私服,原因很简单,有些公司都不提供外网给项目组人员,因此就不能使用maven访问远程的仓库地址,还有就是公司内部开发的一些版本的jar包,如果没有私服需要一人拷贝一份然后再自己安 ...

随机推荐

  1. python得到当前版本号

    import sys print(sys.winver) 3.7 # 导入sys模块的argv,winver成员,并为其指定别名v.wv from sys import argv as v, winv ...

  2. .netcore第三方登录授权:10分钟急速接入

    前言 很多对外应用的开发都考虑接入第三方登录来提高用户的体验感,避免用户进行繁琐的注册登录(登录后的完善资料必不可免). 而QQ.微信.支付宝.淘宝.微博等应用就是首选目标(无他,用户群体大,支持发开 ...

  3. Angular封装WangEditor富文本组件

    富文本组件是web程序中很常用的一个组件,特别是要开发一个博客,论坛这类的网站后台. 得益于Angular的强大,封装WangEditor组件非常简单 1.使用yarn或者npm安装wangedito ...

  4. odoo里面批量上传图片

    import os import base64 def base_data_product_image(self): """ odoo里批量创建产品,并上传图片 图片为b ...

  5. ASP.NET Datalist制作显示效果和img的数据库存储

    1. 具体实现效果如下图: 2.首先使用datalist控件编辑模板,在属性面板选择RepeatColumns="3" RepeatDirection="Horizont ...

  6. memcache(11211)未授权访问

    1.安装Memcache服务端 sudo apt-get install memcached 2.启动服务 sudo memcached -d -m 128 -p 11211 -u root 3.ap ...

  7. 使用 Python 翻译 CHM 帮助文档

    此方法绝对切实可行 翻译成品项目: https://github.com/foyoux/InstallShield2020-Documents 效果预览 安装 docts 库 pip install ...

  8. Netty 源码分析系列(二)Netty 架构设计

    前言 上一篇文章,我们对 Netty做了一个基本的概述,知道什么是Netty以及Netty的简单应用. Netty 源码分析系列(一)Netty 概述 本篇文章我们就来说说Netty的架构设计,解密高 ...

  9. 3D网页小实验-基于多线程和精灵动画实现RTS式单位行为

    一.实验目的: 1.在上一篇的"RTS式单位控制"的基础上添加逻辑线程,为每个单位实现ai计算: 2.用精灵动画为单位的行为显示对应的动作效果. 二.运行效果: 1.场景中的单位分 ...

  10. C++ //多继承语法 C++中允许一个类继承多个类

    1 //多继承语法 C++中允许一个类继承多个类 2 #include <iostream> 3 #include <string> 4 using namespace std ...