Windows下使用Nexus搭建Maven私服
A http://www.pianshen.com/article/249363068/
nexus3安装与配置
B https://www.cnblogs.com/hujunzheng/p/9807646.html
下载与安装
- 下载地址:https://www.sonatype.com/download-oss-sonatype

- 安装:这里直接安装成Windows服务
- 将下载后的压缩文件解压到自己想要的位置。

- 使用管理员方式进入cmd,进入到D:\Nexus\nexus-3.14.0-04\bin。
安装:nexus.exe /install Nexus
启动:nexus.exe /start Nexus
停止:nexus.exe /stop Nexus
卸载:nexus.exe /uninstall Nexus
Nexus:为自定义Windows服务名称。
- 如果不想安装成Windows服务,可以使用命令 nexus.exe /run。如下,启动成功。

- 修改一些配置。D:\Nexus\nexus-3.14.0-04\bin\nexus.vmoptions

D:\Nexus\nexus-3.14.0-04\etc\nexus-default.properties
- 访问和修改admin密码。
URL:http://localhost:8888/
用户名/密码:admin/admin123
修改密码时第一次要验证身份,输入之前的密码,即admin123

- 界面认识

Maven配置
- settings.xml配置
- 指定本地仓库位置
<localRepository>E:/ApacheMavenRepository</localRepository>
- 1
- 配置Nexus认证信息,**注意:**文件使用utf-8保存,不然可能会在eclipse中出现无法解析
<server>
<id>nexus-releases</id>
<username>admin</username>
<password>admin1234</password>
</server>
<server>
<id>nexus-snapshots</id>
<username>admin</username>
<password>admin1234</password>
</server>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 配置镜像,让所有的Maven请求都走私服
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<name>all maven</name>
<url>http://localhost:8888/repository/maven-public/</url>
</mirror>
- 1
- 2
- 3
- 4
- 5
- 6
- 配置仓库和插件仓库,开启快照版本支持。其中id均为central,会覆盖超级pom中央仓库的配置,与url无关紧要,所以url随意。因为所有的请求都会通过镜像访问私服地址。
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 激活profile
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
- 1
- 2
- 3
通过Eclipse上传jar到Nexus私服
- 配置项目pom,上传到快照宿主仓库中。
<distributionManagement>
<repository>
<id>nexus-snapshots</id>
<name>nexus snapshots repository</name>
<url>http://localhost:8888/repository/maven-snapshots/</url>
</repository>
</distributionManagement>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 发布

注意:这里可能出现一个编译错误:就是需要jre而不是java。如果出现这个错误请做如下处理。
- 私服中查看结果


- 删除上传到私服中的jar

通过Nexus界面上传oracle jdbc驱动到私服中
- 下载oracle jdbc驱动:https://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html

- 界面上传

- 查看上传结果,具体在项目中可以通过以上gav使用。

通过命令上传oralce jdbc驱动
mvn deploy:deploy-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.4 -Dpackaging=jar -Dfile=D:\迅雷下载\ojdbc6.jar -Durl=http://localhost:8888/repository/maven-releases/ -DrepositoryId=maven-releases
- 1
创建定时任务清理无用的Snapshot的jar
Windows下使用Nexus搭建Maven私服的更多相关文章
- Windows下使用Nexus搭建Maven私服(安装)
一.下载Nexus 下载OSS最新版:https://www.sonatype.com/download-oss-sonatype 老版本:https://support.sonatype.com/h ...
- Windows下使用Nexus搭建Maven私服(使用)
注意: 1.从3.0版本的Nexus开始,已经不再缓存https://repo1.maven.org/maven2/的包,所以当安装好之后,在界面上不会有任何的包可以搜索到,但是功能是一切正常的,只有 ...
- ubuntu下使用Nexus搭建Maven私服
ubuntu下使用Nexus搭建Maven私服 1.私服简介: 私服是架设在局域网的一种特殊的远程仓库,目的是代理远程仓库及部署第三方构件.有了私服之后,当 Maven 需要下载构件时,直接请求私服, ...
- Linux下使用Nexus搭建Maven私服
在开发过程中,有时候会使用到公司内部的一些开发包,显然把这些包放在外部是不合适的.另外,由于项目一直在开发中,这些内部的依赖可能也在不断的更新.可以通过搭建公司内部的Maven服务器,将第三方和内部的 ...
- Windows下使用Nexus搭建pypi私服
Nexus之前一直作为maven的私服而被大家所熟知,但是其实nexus可以做很多种仓库的私服,官网的说明就揭示了一切,真是又方便又强大的开源工具. 首先下载安装nexus,地址: https://w ...
- Windows使用Nexus搭建Maven私服
简介 Maven私服是架设在局域网的一种特殊的远程仓库,目的是代理远程仓库及部署第三方构件,有了私服之后,当 Maven 需要下载构件时,直接请求私服,私服上存在则下载到本地仓库,否则,私服请求外部的 ...
- Maven——使用Nexus搭建Maven私服
原文:http://www.cnblogs.com/xdp-gacl/p/4068967.html Maven学习总结(九)--使用Nexus搭建Maven私服 一.搭建nexus私服的目的 为什么要 ...
- (转)Maven学习总结(九)——使用Nexus搭建Maven私服
孤傲苍狼只为成功找方法,不为失败找借口! Maven学习总结(九)——使用Nexus搭建Maven私服 一.搭建nexus私服的目的 为什么要搭建nexus私服,原因很简单,有些公司都不提供外网给项目 ...
- 使用Nexus搭建Maven私服问题总结
#业务场景 最近项目要交付给客户了,之前项目开发和测试一直都是使用公司内部的一套环境,项目交付后客户购置了大量服务器,也要将整套测试环境迁移至客户的服务器上,后续的需求变更以及新需求的开发都会在客户服 ...
随机推荐
- 给easyui datebox扩展一个清空按钮,无侵入
/** * 给时间框控件扩展一个清除的按钮 */ $.fn.datebox.defaults.cleanText = '清空'; (function ($) { var buttons = $.ext ...
- MySQL Execution Plan--使用Query Rewrite
安装Query Rewrite Plugin 在MySQL的安装目录的share文件夹下,有两个文件用来安装和卸载Query Rewrite Plugin: install_rewriter.sql: ...
- 『计算机视觉』imgaug图像增强库中部分API简介
https://github.com/aleju/imgaug 介绍一下官方demo中用到的几个变换,工程README.md已经给出了API简介,个人觉得不好理解,特此单独记录一下: import n ...
- Shell 编程 文本处理工具 sed
本篇主要写一些shell脚本文本处理工具sed的使用. 概述 sed(Stream EDitor)是一个强大而简单的文本解析转换工具,可以读取文本,并根据指定的条件对文本内容进行编辑(删除.替换.添加 ...
- php模板模式(template design)
没有写停止条件,所以会一直运行哟. <?php /* The template design pattern defines the program skeleton of an algorit ...
- Jenkins集成allure测试报告
前言 Allure框架是一个功能强大的自动化测试报告工具,不仅支持多种编程语言,而且能够完美的与各种集成工具结合,包括Jenkins,TeamCity,Bamboo,Maven等等,因此受到了很多测试 ...
- LIST OF BEST OPEN SOURCE BLOCKCHAIN PLATFORMS
https://www.blockchain-council.org/blockchain/list-of-best-open-source-blockchain-platforms/ Open so ...
- Educational Codeforces Round 78 (Rated for Div. 2) D. Segment Tree
链接: https://codeforces.com/contest/1278/problem/D 题意: As the name of the task implies, you are asked ...
- Scrapy笔记05- Item详解
Scrapy笔记05- Item详解 Item是保存结构数据的地方,Scrapy可以将解析结果以字典形式返回,但是Python中字典缺少结构,在大型爬虫系统中很不方便. Item提供了类字典的API, ...
- c3p0参数
<c3p0-config> <default-config> <!--当连接池中的连接耗尽的时候c3p0一次同时获取的连接数.Default: 3 --> < ...
