maven 配置私服 连接
两种方法:
1.在单个项目的pom.xml中使用 私服的连接地址,这样只对该项目起作用。
2.在maven的setting.xml配置中添加私服的连接地址。这样对所有项目起作用。
本文章只演示第二种方法:
1.确保nexus私服安装完成并启动。
2.修改本机maven/conf/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">
- //maven的仓库位置
- <localRepository>D:\MAVEN_repository</localRepository>
- <pluginGroups> </pluginGroups>
- <proxies> </proxies>
- //maven操作nexus的权限设置
- </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>3rd-proty</id>
- <username>admin</username>
- <password>admin123</password>
- </server>
- </servers>
- //配置镜像,让maven只使用私服获取
- <mirrors>
- <mirror>
- <id>nexus</id>
- <name>Nexus Repository</name>
- <url>http://10.0.27.61:8081/content/groups/public</url>
- <mirrorOf>*</mirrorOf>
- </mirror>
- </mirrors>
- //配置仓库车插件,一旦配置了镜像,则 这个配置可忽略
- <profiles>
- <profile>
- <id>nexus</id>
- <repositories>
- <repository>
- <id>nexus</id>
- <url>http://10.0.27.61:8081/content/groups/public</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>nexus</id>
- <url>http://10.0.27.61:8081/content/groups/public</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- </profile>
- </profiles>
- //激活上面的配置
- <activeProfiles>
- <activeProfile>nexus</activeProfile>
- </activeProfiles>
- </settings>
maven 配置私服 连接的更多相关文章
- Maven配置私服仓库
首先就是,最基本的打开maven的配置文件,上面是我自己的习惯,多留一个以备不坏 打开setting配置文件,来修改路径(本人不习惯将所有软件放在C盘,一般都是单独存放盘) 接下来就是公司给你的账户和 ...
- maven配置私服中可能遇到的问题
文章目录 之前要写一个hsf的demo,maven的依赖是需要alibaba的私服的,所以出现了下面的错误. 具体参看另一篇文章:https://blog.csdn.net/dataiyangu/ar ...
- maven配置私服
1先配置maven的配置文件 2在项目的pom.xml文件增加 <distributionManagement> <repository> <id>nexus-re ...
- maven配置(安装&使用&私服)文档
1.Maven 环境搭建 Maven 是一个基于 Java 的工具,所以要做的第一件事情就是安装 JDK. 系统要求 项目 要求 JDK Maven 3.3 要求 JDK 1.7 或以上 Maven ...
- 通过Maven配置测试环境和开发环境连接不同的数据库
通过Maven配置测试环境和开发环境连接不同的数据库 作者及来源: 通灵宝玉 - 博客园 收藏到→_→: 此文来自: 马开东博客 网址:http://www.makaidong.com ...
- MAVEN总结,整合Eclipse以及配置私服
对maven的理解 我们知道maven是一个项目管理工具,其核 心特点就是通过maven可以进行jar包的依赖管理,保证jar包版本的一致性,以及可以使多个项目共享jar包,从而能够 在开发大型jav ...
- SpringMVC+Spring+Mybatis整合,使用druid连接池,声明式事务,maven配置
一直对springmvc和mybatis挺怀念的,最近想自己再搭建下框架,然后写点什么. 暂时没有整合缓存,druid也没有做ip地址的过滤.Spring的AOP简单配置了下,也还没具体弄,不知道能不 ...
- 配置Maven从私服下载构件
--------------------siwuxie095 配置 Maven 从私服下载构件 从 Nexus ...
- 配置maven从私服上下载构件
maven 本地setting.xml配置 <!--配置maven从私服上下载构件 --> <profiles> <profile> <repositorie ...
随机推荐
- 简单而粗暴的方法画任意阶数Bezier曲线
简单而粗暴的方法画任意阶数Bezier曲线 虽然说是任意阶数,但是嘞,算法原理是可以到任意阶数,计算机大概到100多阶就会溢出了 Bezier曲线介绍] [本文代码] 背景 在windows的Open ...
- 【提高组NOIP2008】双栈排序 (twostack.pas/c/cpp)
[题目描述] Tom最近在研究一个有趣的排序问题.如图所示,通过2个栈S1和S2,Tom希望借助以下4种操作实现将输入序列升序排序. 操作a 如果输入序列不为空,将第一个元素压入栈S1 操作b 如果栈 ...
- 360度3D 旋转插件
Circlr插件是一款基于jQuery的可以对图片进行360度全方位旋转展示的插件.Circlr通过按一定角度规律拍摄的产品图片,制作出可以使用鼠标拖动.鼠标滚轮和移动触摸来进行图片逐帧旋转的效果.比 ...
- Spring Cloud 入门概括介绍
出处: 拜托!面试请不要再问我Spring Cloud底层原理 概述 毫无疑问,Spring Cloud是目前微服务架构领域的翘楚,无数的书籍博客都在讲解这个技术.不过大多数讲解还停留在对Spring ...
- Spring Boot缓存注解@Cacheable、@CacheEvict、@CachePut使用
从3.1开始,Spring引入了对Cache的支持.其使用方法和原理都类似于Spring对事务管理的支持.Spring Cache是作用在方法上的,其核心思想是这样的:当我们在调用一个缓存方法时会把该 ...
- wex5 sqllite本地数据库的运用
http://doc.wex5.com/?p=3774 需要引入包require("cordova!com.brodysoft.sqlitePlugin"); //本地数据库操作 ...
- Action访问Servlet的API
Action访问Servlet的API_,主要访问如下: 1.>获取request对象 2.>获取请求参数 3.>获取response对象,可用于传递cookie 3.>获取作 ...
- batch文件改修中遇到的sql问题
代码: <?php ////////////////////////////////////////////////////////// // //ダイハツ車種 car_cd毎 平均価格 JSO ...
- CodeForces - 841D Leha and another game about graph
给出一个连通图,并给每个点赋一个d值0或1或-1,要求选出一个边的集合,使得所有的点i要么d[i] == -1,要么 dgree[i] % 2 == d[i],dgree[i]代表i结点的度数. 考虑 ...
- ubuntu 添加新用户并赋予root权限
1 sudo adduser wolbo 2 sudo vim /etc/sudoers root ALL=(ALL) ALLwolbo ALL=(ALL) ALL wolbo ALL=(ALL) N ...