搭建本地MAVEN NEXUS 服务
下载 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 服务的更多相关文章
- 孤荷凌寒自学python第六十一天在Fedora28版的linux系统上找搭建本地Mongodb数据服务
孤荷凌寒自学python第六十一天在Fedora28版的linux系统上找搭建本地Mongodb数据服务 (完整学习过程屏幕记录视频地址在文末) 今天是学习mongoDB数据库的第七天.成功在本地搭建 ...
- 孤荷凌寒自学python第六十天在windows10上搭建本地Mongodb数据服务
孤荷凌寒自学python第六十天在windows10上找搭建本地Mongodb数据服务 (完整学习过程屏幕记录视频地址在文末) 今天是学习mongoDB数据库的第六天.成功在本地搭建了windows ...
- nodejs anywhere 搭建本地静态文件服务
一.背景 工作中有时候往往会遇到下述场景:例如需要将新打好的安装包等文件临时性的给到同事,可能还需要给到多个同事.这时,我们往往有如下几种方案: 1,一般都会有公司内部的文件系统,上传文件后将对应的地 ...
- 搭建本地maven库(nexus服务器)
第一步,下载https://www.sonatype.com/download-oss-sonatype 别下3.x版本,下2.x版本 第二步,解压,在bin目录下执行cmd命令,nexus inst ...
- 使用Nexus搭建本地Maven私服
搭建了好几天这个还是不大好使,今天看了一篇文章是讲这个的,然后根据其情况,加上自己的更改最后搭建成功了 1.下载nexus, 下载地址:http://www.sonatype.org/nexus/go ...
- 使用nexus 搭建本地 maven 服务器
1.下载安装nexus oos https://www.sonatype.com/download-oss-sonatype ,选择2.x 版本. 2. 配置maven <server> ...
- mac nexus搭建本地maven服务器
1.在保证安装jdk 1.7+,去nexus官网下载nexus(http://www.sonatype.com/download-oss-sonatype) 最新版本 2.解压zip文件,配置nexu ...
- Maven之搭建本地私服(nexus)仓库
摘要:现在越来越多的项目都在使用Maven管理项目,尤其是在大型的项目团队中使用Maven能带来更加多的好处,私服的好处我相信大家都明白,在这里我就不多说了,它最重要的作用就是可以让项目团队成员更加方 ...
- centos 如何用 rsyslog 搭建本地日志服务(续1: omprog模块与php deamon的配合使用)
上一篇说到了如何用 rsyslog 搭建本地的日志服务,地址在这里,没有看的童鞋可以先瞅一眼 : http://www.cnblogs.com/smallrookie/p/5677004.html 显 ...
随机推荐
- 初学Html
HTML,超文本标记语言,文本解释性语言,它的源代码不通过编译而直接在浏览器中运行时被翻译,其决定的是网页的结构和内容. 一谈html,自然首先是浏览器,比较具有代表性的浏览器则是谷歌.火狐.IE.苹 ...
- 线段树 hdu4046
Panda Time Limit: 10000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Sub ...
- 5天玩转C#并行和多线程编程
5天玩转C#并行和多线程编程系列文章目录 5天玩转C#并行和多线程编程 —— 第一天 认识Parallel 5天玩转C#并行和多线程编程 —— 第二天 并行集合和PLinq 5天玩转C#并行和多线程编 ...
- asp.net ajax 调用一例
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx. ...
- 清华申请退学博士作品:完全用Linux工作
http://www.cnblogs.com/cbscan/articles/3252872.html 下文地址 http://blog.oldboyedu.com/use-linux/ 按: 尽管我 ...
- ASP.NET同页面内【用户控件与父页面】以及【用户控件与用户控件】之间方法调用
在用户控件中,获取父页面的方法 1:方法没有参数(userInfor()) string userInfor = Convert.ToString(this.Page.GetType().GetMet ...
- Spring使用环境变量控制配置文件加载
项目中需要用到很多配置文件,不同环境的配置文件是不一样的,因此如果只用一个配置文件,势必会造成配置文件混乱,这里提供一种利用环境变量控制配置文件加载的方法,如下: 一.配置环境变量 如果是window ...
- 如何解决虚拟机克隆导致"Bringing up interface eth0: Error: No suitable device found: no device found for connection 'System eth0'."
在VMware的虚拟机中克隆CentOS,在重启网卡的时候报错: Bringing up interface eth0: Error: No suitable device found: no de ...
- springmvc的xml版本和注解版本
感觉还是注解方式比较实用 xml方式 web.xml <!-- 读取spring mvc的核心配置文件 --> <servlet> <servlet-name>yx ...
- redis集群的一些笔记
当节点数量少于6个时候会提示如下信息,初始化一个集群的时候需要6个节点,为什么?? *** ERROR: Invalid configuration for cluster creation. *** ...