检查步骤如下:

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无法在远程仓库下载的问题解决的更多相关文章

  1. 让maven项目使用nexus作为远程仓库

    让maven项目使用nexus作为远程仓库有两种方式,第一种是在项目的pom.xml中进行更改,让单个项目使用nexus仓库:另一种是通过修改maven的配置文件settings.xml进行更改,让所 ...

  2. Maven项目使用Nexus作为远程仓库的settings.xml配置

    Maven项目使用Nexus作为远程仓库的settings.xml配置(转) 在自己电脑C:\Users\hanmm\.m2\下的setting.xml. 1.服务器配置 <server> ...

  3. 解决android studio引用远程仓库下载慢(转)

    解决android studio引用远程仓库下载慢(JCenter下载慢) 第一种方法 使用开源中国的maven库 阿里云的(速度飞快):http://maven.aliyun.com/nexus/c ...

  4. maven 添加jar到中央/远程仓库

    maven 添加jar到中央/远程仓库 开源中国 发表于 2014-08-23 00:08:00 commond: mvn deploy:deploy-file -DgroupId=com.tima. ...

  5. android studio 引用远程仓库下载慢(JCenter下载慢)的办法

    https://blog.csdn.net/linglingchenchen/article/details/62236723 解决android studio引用远程仓库下载慢(JCenter下载慢 ...

  6. Maven distributionManagement 分发构件至远程仓库

    https://blog.csdn.net/qq827245563/article/details/82661583 maven发布到本地仓库,和私服https://blog.csdn.net/u01 ...

  7. Maven 远程仓库下载慢的的解决方案

    配置很简单,修改conf文件夹下的settings.xml文件,添加如下镜像配置: 我直接去设置maven目录下面的setttings文件 添加镜像站点 <mirrors> <mir ...

  8. 解决android studio引用远程仓库下载慢(JCenter下载慢)

    使用开源中国的maven库 阿里云的(速度飞快):http://maven.aliyun.com/nexus/content/groups/public/ 替换项目根目录下build.gradle中的 ...

  9. IDEA/Git 设置多个push远程仓库或者同时提交多个push仓库

    注:写在最上面的这个提交地址将会是唯一的pull地址 具体解决办法: 在隐藏文件.git 下有个config文件,打开,在最后一行添加以下信息 [remote "all"] url ...

随机推荐

  1. Eclipse工具栏太多,自定义工具栏,去掉调试

    Window --> Customize Perspective... --> Tool Bar Visibility 去掉勾选debug  Tip:最新版本Customize Persp ...

  2. 线段树+矩阵快速幂 Codeforces Round #373 (Div. 2) E

    http://codeforces.com/contest/719/problem/E 题目大意:给你一串数组a,a[i]表示第i个斐波那契数列,有如下操作 ①对[l,r]区间+一个val ②求出[l ...

  3. Linux : 多线程下载工具: axel

    wget 应该是最常用的下载工具了,但是其不支持多线程下载. axel 安装 epel 源有 axel 的二进制包,可以使用 yum 安装. yum install epel-release yum ...

  4. 微信小程序登录状态

    我们知道,WEB服务器通过浏览器携带的cookie获取session来判断是否是同一用户(或浏览器):Restful服务通过客户端传过来唯一ID,来识别调用用户. >为什么需要维护登录态? 有自 ...

  5. Linux下Tomcat开机自动启动

    linux下tomcat开机自动启动有两种方法,一种是简单,一种是复杂而又专业的,使用shell脚本要实现,我们一般推荐shell脚本启动方式.下面我们分别介绍这两种方法. 1.shell脚本启动 众 ...

  6. Python学习笔记 - day3 - 数据类型及运算符

    Python的数据类型 计算机顾名思义就是可以做数学计算的机器,因此,计算机程序理所当然地可以处理各种数值.但是,计算机能处理的远不止数值,还可以处理文本.图形.音频.视频.网页等各种各样的数据,不同 ...

  7. python3,判断,循环练习1

    1.使用while循环输出1 2 3 4 5 6 8 9 10 i = 1 while i <= 10: if i == 7: i += 1 print(end=' ') continue pr ...

  8. IOS UITableViewUITableView小技巧--实现cell向左滑动删除,编辑等功能

    - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { return Y ...

  9. __rb_tree_rebalance

    Inline void __rb_tree_rebalance(__rb_tree_node_base* x, __rb_tree_node_base*& root) //当前节点,根 { x ...

  10. Selenium2+python自动化20-Excel数据参数化【转载】

    前言 问: Python 获取到Excel一列值后怎么用selenium录制的脚本中参数化,比如对登录用户名和密码如何做参数化? 答:可以使用xlrd读取Excel的内容进行参数化.当然为了便于各位小 ...