下载 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. linux之"server" directive is not allowed here in

    配置完rewrite之后重启nginx发现如下错误 "server" directive is not allowed here in* 原因是因为 外部配置的simple.con ...

  2. 关于如何获取/清除 MAXScript 侦听器内的文本

    关于如何获取/清除 MAXScript 侦听器内的文本 用来保存记录?还没想到实际用处,先记上. macroRecorder as string listener as stringclearList ...

  3. javascript的document.execCommand(转)

    document.execCommand()方法处理html数据时常用语法格式如下: 代码: document.execCommand(sCommand[,交互方式, 动态参数]) 其 中:sComm ...

  4. lua脚本教程

    --[[工具准备 1.一个支持UTF8无BOM编码的工具,例如:notepad++ 2.一个多文件搜索关键字的工具,例如:File Seeker 3.Eluna对应端的源码 ]]-- --[[网站相关 ...

  5. VS Copy Files after build

    <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ItemGroup> ...

  6. 如何修改SVN已提交项目的message log

    直接在TortoiseSVN中修改过往日志,会提示: DAV request failed;it's possible that the repository's pre-revprop-change ...

  7. [补充工程统计case]科技活动经费sql2014

    select bd_glorgbook.glorgbookcode,bd_glorgbook.glorgbookname, gl_detail.explanation, bd_accsubj.disp ...

  8. NPOI系列

    NPOI(1):Asp.net操作Excel NPOI(2):基础 NPOI格式设置 设置Excel的自动筛选功能 Npoi导出xlsx Npoi读取xlsx

  9. Windows下查看进程及结束进程命令[转]

    Windows下查看进程及结束进程命令 1)查看占用8080端口的进程号 >netstat –aon | findstr “8080” 结果:TCP    0.0.0.0:8080        ...

  10. html__脚本之家

    深入剖析Android的Volley库中的图片加载功能 Android图片加载缓存框架Glide Android程序开发ListView+Json+异步网络图片加载+滚动翻页的例子(图片能缓存,图片不 ...