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 ...
随机推荐
- SpringMVC学习 -- ModelAndView , Model , ModelMap , Map 及 @SessionAttributes 的使用
输出模型数据: ModelAndView:处理方法返回值类型为 ModelAndView 时 , 其中包含视图和模型信息.方法体即可通过该对象添加模型数据 , 即 SpringMVC 会把 Model ...
- 关于IE6的一些总结
开篇之前,循例简单说说IE6的一些背景吧. IE6是指微软浏览器系列中的第六个版本,它是在2001年的时候伴随着XP系统的问世而同时推出的一款浏览器.因为XP普及的原因,这款浏览器一度问鼎全球浏览器市 ...
- kafka+flume+HDFS日志采集项目框架
1,项目图如下: 2, 实现过程 启动HDFS: sbin/start-dfs.sh 启动zookeeper(三台): bin/zkServer.sh start 启动kafka(三台): root@ ...
- 百练2505:A multiplication game
传送门:http://bailian.openjudge.cn/practice/2505/ [题解] 我们找找规律: 1~9显然是Stan wins. 10~18是Ollie wins. 19~16 ...
- 【转】vs2015一键卸载干净
插件是国外的一位同行写的,偶然在网上发现感觉挺好用,分享一下. 第二步.下载工具并解压 网盘下载地址:https://pan.baidu.com/s/1eSHRYxW 也可以在Github上下载最新版 ...
- classNotFound修复
万恶的这个bug,也是经常遇见,每一次都是在反复检查完代码之后并没有发现错误,然后开始上网百度,发现也并没有一个准确的解答.在此给出我的个人的修复bug的过程. 1.首先我是遇到了找不到entity中 ...
- ggplot2绘制多图
参考链接:http://www.cnblogs.com/nxld/p/6065237.html ggplot2.multiplot是一个易于使用的功能,将多个图形在同一页面上使用R统计软件和GGPLO ...
- servlet(2) - 利用MyEclipse新建一个servlet - 小易Java笔记
1.Tomcat在MyEclipse中集成 ==> Window-preferences-MyEclipse-Servers-Tomcat-Tomcat 6.x-点击右侧的Browse,选择你的 ...
- 解决spf13-vim编辑php丢失语法颜色问题
$ vim .vim/bundle/PIV/ftplugin/php.vim //注释掉以下: "call s:InitVariable("g:load_doxygen_synta ...
- python通过多进程实行多任务
#原创,转载请联系 在开始之前,我们要知道什么是进程.道理很简单,你平时电脑打开QQ客户端,就是一个进程.再打开一个QQ客户端,又是一个进程.那么,在python中如何用一篇代码就可以开启几个进程呢? ...