下载 http://120.192.76.70/cache/www.sonatype.org/downloads/nexus-latest-bundle.zip?ich_args=232fba36eda60cc9ee68056f81cb509a_1_0_0_6_4134a24bc046738e6d5d5481bbcd882e530b3f7c84299146b6df2a137e76bacc_67add3538e2edbcfc41f6d5a625eb0d4_1_0&ich_ip=

在centos 上建立用户 nexus

unzip 下载的 安装文件 ,在 运行 nexus start

访问 8081 端口.使用admin admin123 login in  ,修改 缺省库地址

修改 m2/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"> <servers>
<server>
<id>nexus-releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>nexus-snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>nexus-thirdparty</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers> <mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://48.0.191.154:8081/nexus/content/groups/public</url>
</mirror>
<mirror>
<id>nexus-snapshots</id>
<mirrorOf>*</mirrorOf>
<url>http://48.0.191.154:8081/nexus/content/groups/public-snapshots</url>
</mirror>
<mirror>
<id>nexus-thirdparty</id>
<mirrorOf>*</mirrorOf>
<url>http://48.0.191.154:8081/nexus/content/repositories/thirdparty</url>
</mirror>
<mirror> <id>nexus-thirdparty</id>
<name>nexus-thirdparty</name>
<url>http://48.0.191.154:8081/nexus/content/repositories/thirdparty</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
<proxies> </proxies>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>nexus</id>
<url>http://48.0.191.154:8081/nexus/content/groups/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository> <repository>
<id>com.springsource.repository.maven.release</id>
<url>http://maven.springframework.org/release/</url>
<snapshots><enabled>false</enabled></snapshots>
</repository>
<repository>
<id>oracleReleases</id>
<name>Oracle Released Java Packages</name>
<url>http://download.oracle.com/maven</url>
</repository> <repository>
<id>repo1.maven.org</id>
<name>repo1.maven.org</name>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>JBossRepo1</id>
<name>Jboss1</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
</repository>
<repository>
<id>JBossRepo</id>
<name>Jboss</name>
<url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
</repository> <repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release-remote</name>
<url>http://repo.spring.io/libs-release-remote</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot-remote</name>
<url>http://repo.spring.io/libs-snapshot-remote</url>
</repository>
</repositories>
<pluginRepositories> <pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>http://repo.spring.io/plugins-release</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>plugins-snapshot</name>
<url>http://repo.spring.io/plugins-snapshot</url>
</pluginRepository>
</pluginRepositories> </profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>

如果以前在 .m2\repository中有已经下载的 可以拷贝到 nexus中的库中选择,并 reindex

在项目的 pom.xml

 <?xml version="1.0" encoding="UTF-8"?>
<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> <groupId>test</groupId>
<artifactId>testmaven</artifactId>
<version>1.0-SNAPSHOT</version> <distributionManagement>
<repository>
<id>nexus-releases</id>
<name>Nexus Release Repository</name>
<url>http://48.0.191.154:8081/nexus/content/repositories/releases</url> </repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>http://localhost:8081/nexus/content/repositories/snapshots</url> </snapshotRepository>
</distributionManagement> <dependencies> <dependency>
<groupId>apache-log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
</dependency>
</dependencies> </project>

搭建本地MAVEN NEXUS 服务的更多相关文章

  1. 孤荷凌寒自学python第六十一天在Fedora28版的linux系统上找搭建本地Mongodb数据服务

    孤荷凌寒自学python第六十一天在Fedora28版的linux系统上找搭建本地Mongodb数据服务 (完整学习过程屏幕记录视频地址在文末) 今天是学习mongoDB数据库的第七天.成功在本地搭建 ...

  2. 孤荷凌寒自学python第六十天在windows10上搭建本地Mongodb数据服务

     孤荷凌寒自学python第六十天在windows10上找搭建本地Mongodb数据服务 (完整学习过程屏幕记录视频地址在文末) 今天是学习mongoDB数据库的第六天.成功在本地搭建了windows ...

  3. nodejs anywhere 搭建本地静态文件服务

    一.背景 工作中有时候往往会遇到下述场景:例如需要将新打好的安装包等文件临时性的给到同事,可能还需要给到多个同事.这时,我们往往有如下几种方案: 1,一般都会有公司内部的文件系统,上传文件后将对应的地 ...

  4. 搭建本地maven库(nexus服务器)

    第一步,下载https://www.sonatype.com/download-oss-sonatype 别下3.x版本,下2.x版本 第二步,解压,在bin目录下执行cmd命令,nexus inst ...

  5. 使用Nexus搭建本地Maven私服

    搭建了好几天这个还是不大好使,今天看了一篇文章是讲这个的,然后根据其情况,加上自己的更改最后搭建成功了 1.下载nexus, 下载地址:http://www.sonatype.org/nexus/go ...

  6. 使用nexus 搭建本地 maven 服务器

    1.下载安装nexus oos https://www.sonatype.com/download-oss-sonatype ,选择2.x 版本. 2. 配置maven <server> ...

  7. mac nexus搭建本地maven服务器

    1.在保证安装jdk 1.7+,去nexus官网下载nexus(http://www.sonatype.com/download-oss-sonatype) 最新版本 2.解压zip文件,配置nexu ...

  8. Maven之搭建本地私服(nexus)仓库

    摘要:现在越来越多的项目都在使用Maven管理项目,尤其是在大型的项目团队中使用Maven能带来更加多的好处,私服的好处我相信大家都明白,在这里我就不多说了,它最重要的作用就是可以让项目团队成员更加方 ...

  9. centos 如何用 rsyslog 搭建本地日志服务(续1: omprog模块与php deamon的配合使用)

    上一篇说到了如何用 rsyslog 搭建本地的日志服务,地址在这里,没有看的童鞋可以先瞅一眼 : http://www.cnblogs.com/smallrookie/p/5677004.html 显 ...

随机推荐

  1. 在HTML标签<a/>中调用javascript代码

    <a/>标签的“href”属性可以是一个有效的URL,表示跳转的目的地,除此之外,href还可以是一段javascript代码.当为“href”设置javascript代码时,格式如下:& ...

  2. poj3160 强连通+记忆化搜索

    题意:有一张 n 点 m 边的有向无环图,每个点有各自的权值,可正可负,现在从一个点开始走,一直走到不能走到其他点为止,每经过一个点,可以选择获得或不获得它的权值,每个点可以走多次,但是权值只能获得一 ...

  3. Windows 10 x64 安装 Visual Basic 6.0 SP6

    原文是E文,E文好的可以直接看这里:http://www.fortypoundhead.com/showcontent.asp?artid=23993 原则上Windows 7 x64, Window ...

  4. 转载: 正确处理浏览器在下载文件时HTTP头的编码问题(Content-Disposition)

    最近在做一个下载工具时,发现CSDN上的资源下载时竟然没有被拦截到,经过分析,终于有了一个发现,解决了我之前做文件下载时的乱码问题,所以转载这篇释疑文章,希望有人可以看到,可以从中得到帮助,也用来备忘 ...

  5. python---字符编码

    获取系统默认字符编码 在Python代码中,普通字符串的编码方式与程序源文件编码方式一致的,而很多IDE在默认情况下,将程序源文件按照系统默认字符编码来保存的. 下面给出用Python获取系统默认编码 ...

  6. ruby md5加签验签方法

    # md5签名def md5_sign(data,key) return OpenSSL::Digest::MD5.hexdigest(data+key)end # md5验签def md5_veri ...

  7. 1.注册或登录页面设计:UILabel,UIButton,UITextField

    学习iOS开发已经有一段时日了,之前一直没有系统的对iOS开发的相关知识进行归纳总结,导致很多知识点云里雾里在脑子里形不成iOS开发的思想,现将自己在学习过程中遇到的一些知识进行总结,希望能对iOS初 ...

  8. 在windows上安装scikit-learn开发环境

    操作系统:Windows 10 64位 1.安装python 前往https://www.python.org/downloads/下载对应操作系统的版本,笔者下载了32位的python 2.7.13 ...

  9. Js 扩展

    计算字符串的字节长度 String.prototype.len = function () { return this.replace(/[^\x00-\xff]/g, 'xx').length; } ...

  10. Linux 日志服务器 rsyslog

    预先需要httpd.php.mysql,yum方式安装.创建数据库: yum install rsyslog rsyslog-mysql cd /usr/share/doc/rsyslog-mysql ...