转自: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. Pandas高级教程之:稀疏数据结构

    目录 简介 Spare data的例子 SparseArray SparseDtype Sparse的属性 Sparse的计算 SparseSeries 和 SparseDataFrame 简介 如果 ...

  2. python twain

    self.SD.SetCapability(twain.CAP_DUPLEXENABLED, twain.TWTY_BOOL, 0) #单面扫描 self.SD.SetCapability(twain ...

  3. C语言:读TXT 模拟键盘打字输出

    //#include<ctype.h> #include<stdio.h> #include <windows.h> //#include "string ...

  4. endless 如何实现不停机重启 Go 程序?

    转载请声明出处哦~,本篇文章发布于luozhiyun的博客:https://www.luozhiyun.com/archives/584 前几篇文章讲解了如何实现一个高效的 HTTP 服务,这次我们来 ...

  5. 解决linux下按退格键出现 ^? 的问题

    处理办法:使用stty命令修改. stty命令语法 stty是linux下改变和打印终端设置的常用命令. stty(选项)(参数) -a:以容易阅读的方式打印当前的所有配置: -g:以stty可读方式 ...

  6. linux查看电脑温度

    sudo apt-get install lm-sensors # 安装yes | sudo sensors-detect # 侦测所有感测器 sensors # 查看温度

  7. Requests方法 -- session方法

    import requests#禁用安全请求警告from requests.packages.urllib3.exceptions import InsecureRequestWarningreque ...

  8. C++:常量

    /** https://www.runoob.com/cplusplus/cpp-constants-literals.html * 常量: 固定值,一旦定义不能被修改 * 整数常量:可以是十进制.八 ...

  9. 微信小程序云开发-云存储的应用-识别营业执照

    一.准备工作 1.创建云函数identify 二.云函数identify中index.js代码 1 // 云函数入口文件 2 const cloud = require('wx-server-sdk' ...

  10. Delimiter must not be alphanumeric or backslash php报错原因

    昨天写了一个小程序,其中用到了正则表达式去匹配内容.  php源代码如下: preg_match("\b(\w+)\b\s+\1\b",$match):   此报错警告的中文意思是 ...