Maven设置snapshot无法在远程仓库下载的问题解决
检查步骤如下:
1、检查nexus是否纳入public版本中:

2、配置中是否启用snapshots功能。以下方法两种设置都可以,任选一个即可。
一种是在项目pom.xml使用:
<repositories>
<repository>
<id>test-nexus</id>
<name>test</name>
<url>http://192.168.1.253/nexus/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
另外一种是直接在maven的settings.xml中体现:
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>central</id>
<name>Nexus</name>
<url>http://192.168.1.253/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Nexus</name>
<url>http://192.168.1.253/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
activeProfile一定要加,不然配置不生效。结构很简单,以profile的形式引入,pluginRepository节点可以不用引入,但是snapshots enabled必须设置为true。
可以查看配置是否生效:
mvn help:effective-pom
或者
mvn compile -U
参考:
https://www.cnblogs.com/2005wind/p/4899983.html(以上内容转自此篇文章)
http://blog.sina.com.cn/s/blog_70ae1d7b0102wo9h.html
http://blog.csdn.net/xiaojianpitt/article/details/7818161
http://maven.apache.org/settings.html
Maven设置snapshot无法在远程仓库下载的问题解决的更多相关文章
- 让maven项目使用nexus作为远程仓库
让maven项目使用nexus作为远程仓库有两种方式,第一种是在项目的pom.xml中进行更改,让单个项目使用nexus仓库:另一种是通过修改maven的配置文件settings.xml进行更改,让所 ...
- Maven项目使用Nexus作为远程仓库的settings.xml配置
Maven项目使用Nexus作为远程仓库的settings.xml配置(转) 在自己电脑C:\Users\hanmm\.m2\下的setting.xml. 1.服务器配置 <server> ...
- 解决android studio引用远程仓库下载慢(转)
解决android studio引用远程仓库下载慢(JCenter下载慢) 第一种方法 使用开源中国的maven库 阿里云的(速度飞快):http://maven.aliyun.com/nexus/c ...
- maven 添加jar到中央/远程仓库
maven 添加jar到中央/远程仓库 开源中国 发表于 2014-08-23 00:08:00 commond: mvn deploy:deploy-file -DgroupId=com.tima. ...
- android studio 引用远程仓库下载慢(JCenter下载慢)的办法
https://blog.csdn.net/linglingchenchen/article/details/62236723 解决android studio引用远程仓库下载慢(JCenter下载慢 ...
- Maven distributionManagement 分发构件至远程仓库
https://blog.csdn.net/qq827245563/article/details/82661583 maven发布到本地仓库,和私服https://blog.csdn.net/u01 ...
- Maven 远程仓库下载慢的的解决方案
配置很简单,修改conf文件夹下的settings.xml文件,添加如下镜像配置: 我直接去设置maven目录下面的setttings文件 添加镜像站点 <mirrors> <mir ...
- 解决android studio引用远程仓库下载慢(JCenter下载慢)
使用开源中国的maven库 阿里云的(速度飞快):http://maven.aliyun.com/nexus/content/groups/public/ 替换项目根目录下build.gradle中的 ...
- IDEA/Git 设置多个push远程仓库或者同时提交多个push仓库
注:写在最上面的这个提交地址将会是唯一的pull地址 具体解决办法: 在隐藏文件.git 下有个config文件,打开,在最后一行添加以下信息 [remote "all"] url ...
随机推荐
- python函数超时,用装饰器解决 func_timeout
https://zhuanlan.zhihu.com/p/39743129 https://www.jianshu.com/p/a7fc98c7af4d https://ixyzero.com/blo ...
- Substrings(hdu 4455)
题意: 给定一个序列ai,个数为n.再给出一系列w:对于每个w,求序列中,所有长度为w的连续子串中的权值和,子串权值为子串中不同数的个数. /* dp[i]表示长度为i的序列不同元素个数之和. 考虑从 ...
- redis连接池自动释放
http://blog.itpub.net/29485627/viewspace-1977880/
- abstract 与interface区别
1.abstract用于修饰类,interface用于修饰接口 2.抽象类中可以有抽象和非抽象方法,接口中只能定义抽象方法,不能有实现 3.抽象类必须被继承,interface被实现 4.抽象类有构造 ...
- 【Foreign】置换 [数论][置换]
置换 Time Limit: 10 Sec Memory Limit: 256 MB Description Input Output Sample Input 4 2 1 4 3 Sample O ...
- [bzoj1015][JSOI2008]星球大战——并查集+离线处理
题解 给定一张图,支持删点和询问连通块个数 按操作顺序处理的话要在删除点的同时维护图的形态(即图具体的连边情况),这是几乎不可做的 我们发现,这道题可以先读入操作,把没删的点的边先连上,然后再倒序处理 ...
- 对象是否拥有某个属性,in和for in以及object.hasOwnProperty('×××')的异同,以及Object.defineProperty(),Object.keys(),Object.getOwnPropertyNames()的用法
1.在某个对象是否拥有某个属性,判断的方法有很多,常用的方法就是object.hasOwnProperty('×××'),这个方法是不包括对象原型链上的方法的,举个例子: var obj = { na ...
- 工作技能===开发不改bug?给你支个招
在测试过程中,不免会遇到开发人员因为一些原因不想修改个别bug的情况.那一般遇到这种问题时,我们该如何去推进开发修改bug呢? 我们先来分析下到底会有哪些原因会导致开发不修改bug 1. 开发与测试对 ...
- python的算法:二分法查找(1)
1.什么是二分法查找: 1.从数组的中间元素开始,如果中间元素正好是要查找的元素,则搜素过程结束: 2.如果某一特定元素大于或者小于中间元素,则在数组大于或小于中间元素的那一半中查找,而且跟开始一样从 ...
- Codeforces 1023 D.Array Restoration-RMQ(ST)区间查询最值 (Codeforces Round #504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Fi)
D. Array Restoration 这题想一下就会发现是只要两个相同的数之间没有比它小的就可以,就是保存一下数第一次出现和最后一次出现的位置,然后查询一下这个区间就可以,如果有0的话就进行填充. ...