下载 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. Channel States

    Introduction A channel (a call) will go through many different states during its lifetime. Here we w ...

  2. mui适用场景说明,能不能在普通浏览器里使用,能否用于wap网站

    mui适用场景说明 为解决HTML5在低端Android机上的性能缺陷,mui引入了原生加速,其中最关键的就是webview控件,因此mui若要发挥其全部能力,需和5+ App配合适用,若脱离5+ A ...

  3. 如何让AutoCAD自动加载Arx,比如ArxDbg.arx

    1.在AutoCAD的安装根目录下,用记事本创建一个acad.rx文件,如下 ------acad.rx----- ArxDbg.arx -------------------- 2.将ArxDbg. ...

  4. JavaScript 装逼指南

    Summary 本文秉承着 你看不懂是你sb,我写的代码就要牛逼 的理念来介绍一些js的装逼技巧. 下面的技巧,后三个,请谨慎用于团队项目中(主要考虑到可读性的问题),不然,leader 干你没商量. ...

  5. JUQERY 获取同名称的所有CHECKBOX ,获取已经选择的,并且jquery进行勾选!

    var @(Perfix)_CheckArray=[]; @(Perfix)_CheckArray.length=0; var checkedItems = $('input[name="@ ...

  6. js call()和apply()

    一.call()和apply(),实例如下: function add(a,b) {     alert(a+b); } function sub(a,b) {     alert(a-b); } a ...

  7. Hadoop 2.6.4单节点集群配置

    1.安装配置步骤 # wget http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.rpm # rpm -i ...

  8. TIOBE Index for December 2015(转载)

    There is hardly any doubt about it, Java will become TIOBE's programming language of the year 2015. ...

  9. discuz论坛与其它网站登录注册整合

    discuz论坛与其它网站登录注册整合 本文以discuz 7.0.0 php版本的论坛与 .net 2.0的网站注册登录整合为类.没有采用uc_center或第三方插件.以另类的方式实现.此方法实现 ...

  10. bash检查文件格式

    情形描述:最近在做一个ETL的项目,用的是CLoverETL,需要在拿到文件后对文件格式进行检验,以决定是否继续. 主要功能是检查每个文件中有几个“|”符号,项目中约定以该符号来作为分隔,所以检查每个 ...