搭建本地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 显 ...
随机推荐
- C#的输入、输出与运算符、数据类型
(1)Visual Studio.NET起始页 启动Visual Studio.NET后,首先看到一个如下图所示的起始页.在起始页可以打开已有的项目或建立新的项目. (2)新建Visual1C# .n ...
- 基于MVC4+EasyUI的Web开发框架形成之旅--总体介绍
最近花了很多时间在重构和进一步提炼Winform开发框架的工作上,加上时不时有一些项目的开发工作,我博客里面介绍Web开发框架的文章比较少,其实以前在单位工作,80%的时间是做Web开发的,很早就形成 ...
- mysql-创建库之问题
一.在登入mysql命令行,创建数据库时报错 ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'xiaolu ...
- php读取sql2000的image字段,被截断的问题
php 存取sql server中类型的照片信息! <?php header("Content-Type:text/html;charset=gb2312"); $url=& ...
- yii2 使用twig 模板引擎
yii2 默认使用PHP 和html 混合的方式来写视图层,但我个人还是喜欢纯模板语言的方式.而且已经非常习惯使用twig的语法,最近想使用yii2进行开发,所以还是选择使用twig视图引擎. git ...
- Null modem接线
1.6 <-> 4 2 <-> 3 3 <-> 2 4 <-> 1.6 5 <-> 5 7 <-> 8 8 <-> ...
- sql rollup解决责任人收支余额
问题的提出是周聪之前问过我的项目往来查询,不好在NC上一次性查询到.然后我就搞了一个很长的项目对账,发布了NC的节点. 现在我做了总二的总账,每次领导问我项目还有多少钱,收了多少付了多少,我还要通过科 ...
- 正常月报表年初未分配利润修改backup
原来:GLQC('3132',K('年')-1,'12',,,'本币','N','','本币','0001')+GLQC('314115',K('年')-1,'01',,,'本币','N','','本 ...
- [转载] 【Shiro】Apache Shiro架构之实际运用(整合到Spring中)
写在前面:前面陆陆续续对Shiro的使用做了一些总结,如题,这篇博文主要是总结一下如何将Shiro运用到实际项目中,也就是将Shiro整到Spring中进行开发.后来想想既然要整,就索性把Spring ...
- Unity3D使用Assetbundle打包加载(Prefab、场景)
之前有一篇文章中我们相惜讨论了Assetbundle的原理,如果对原理还不太了解的朋友可以看这一篇文章:Unity游戏开发使用Assetbundle加载场景的原理 本篇文章我们将说说assetbund ...