检查步骤如下:

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. jw player学习笔记

    一.是否支持IE7/8 本地离线播放不支持IE7/8,部署在服务器上时可以. 本地播放报错示意图 二.如何去Logo 1.网页版--HTML5---破解 桌面浏览器看到的效果: jwplayer(&q ...

  2. 转:强化学习(Reinforcement Learning)

    机器学习算法大致可以分为三种: 1. 监督学习(如回归,分类) 2. 非监督学习(如聚类,降维) 3. 增强学习 什么是增强学习呢? 增强学习(reinforcementlearning, RL)又叫 ...

  3. 【BZOJ2527】【POI2011】Meteors [整体二分]

    Meteors Time Limit: 60 Sec  Memory Limit: 128 MB[Submit][Status][Discuss] Description 这个星球经常会下陨石雨.BI ...

  4. 「6月雅礼集训 2017 Day1」看无可看

    [题目大意] 给出n个数,a[1]...a[n],称作集合S,求

  5. jzoj2701 【GDKOI2012模拟02.01】矩阵

    传送门:https://jzoj.net/senior/#main/show/2701 [题目大意] 给出矩阵A,求矩阵B,使得

  6. bzoj1575 [Usaco2009 Jan]气象牛Baric

    传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1575 [题解] 动态规划,令f[i,j]表示前i个选了j个,且第i个必选的最小值. 转移就枚 ...

  7. <script>中的async与defer属性

    1.script元素中的defer属性 1.1说明 使用该属性可以使脚本延迟到文档完全被解析和显示之后再按照原本的顺序执行,即告诉浏览器立即下载脚本,但延迟执行,该属性只对外部脚本有效 1.2使用方法 ...

  8. 【mysql优化】语句优化

    1.int型子查询陷阱 如下两个表: mysql> desc user; +----------+-------------+------+-----+---------+-------+ | ...

  9. 【Mysql优化】MySQL Profiling 的使用

    要想优化一条 Query,我们就需要清楚的知道这条 Query 的性能瓶颈到底在哪里,是消耗的 CPU计算太多,还是需要的的 IO 操作太多?要想能够清楚的了解这些信息,在 MySQL 5.0 和 M ...

  10. Linux下面无线网络配置

    原文:http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html 配置 WLAN 特定参数 iwconfig ethX essid ...