http://www.mzone.cc/article/654.html

有两种方法可以解决:

1、第一种方法是在项目的pom文件中进行配置,如下

  1. <repositories>
  2. <repository>
  3. <id>cc-mzone-nexus</id>
  4. <name>MZONE</name>
  5. <url>http://192.168.1.112/nexus/content/groups/public/</url>
  6. <snapshots>
  7. <enabled>true</enabled>
  8. <updatePolicy>interval:5</updatePolicy>
  9. </snapshots>
  10. </repository>
  11. </repositories>

2、第二种方法是在maven的配置文件(conf/settings.xml)中进行配置,如下

  1. <profiles>
  2. <profile>
  3. <id>cc-mzone-profile</id>
  4. <repositories>
  5. <repository>
  6. <id>cc-mzone-nexus</id>
  7. <name>MZONE</name>
  8. <url>http://192.168.1.112/nexus/content/groups/public/</url>
  9. <releases>
  10. <enabled>true</enabled>
  11. </releases>
  12. <snapshots>
  13. <enabled>true</enabled>
  14. <updatePolicy>interval:10</updatePolicy>
  15. </snapshots>
  16. </repository>
  17. </repositories>
  18. </profile>
  19. </profiles>
  20. <activeProfiles>
  21. <activeProfile>cc-mzone-profile</activeProfile>
  22. </activeProfiles>

以上两种方式都是打开snapshot快照库,允许快照库生效(重要就是snapshot中enabled要设置为true),第一种是项目级别的,第二种是全局的。出现的问题当然主要还是默认snapshot快照库是没有生效导致的,如此配置即可解决问题!

jshuai:

把下面放到pom.xml里

<repositories>
<repository>
<id>nexus</id>
<name>Nexus Mirror</name>
<url>http://xxx.xxx.com:1234/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

网络:

<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>

  

或者是修改settings.mxl

<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>

  

http://www.cnblogs.com/adolfmc/p/5066466.html

maven 不能使用 snapshot 的解决方式

不能使用 snapshot 的解决方式的更多相关文章

  1. maven 不能使用 snapshot 的解决方式

    最近项目需要用到snapshot的包来进行构建过程,但是怎么都下不了构建的snapshot包.查询了相关资料,发现网上的资料不全,特总结下: 我使用的是nexus来作为代理中央库proxy. 检查步骤 ...

  2. Hadoop常见异常及其解决方式

    1.Shell$ExitCodeException 现象:执行hadoop job时出现例如以下异常: 14/07/09 14:42:50 INFO mapreduce.Job: Task Id : ...

  3. 【翻译自mos文章】使用aum( Automatic Undo Management) 时遇到 ORA-01555错误--- 原因和解决方式。

    使用aum( Automatic Undo Management) 时遇到 ORA-01555错误--- 原因和解决方式. 參考原文: ORA-01555 Using Automatic Undo M ...

  4. The trust relationship between this workstation and the primary domain failed(断网可以登进来)(正确的解决方式用管理员登进去 :退域再加域)

    The trust relationship between this workstation and the primary domain failed(断网可以登进来)(正确的解决方式用管理员登进 ...

  5. Android内存优化-内存泄漏的几个场景以及解决方式

    转自:http://blog.csdn.net/a910626/article/details/50849760 一.什么是内存泄漏 在Java程序中,如果一个对象没有利用价值了,正常情况下gc是会对 ...

  6. Linux下Chrome浏览器不支持WebGL的解决方式。

    今天使用Chrome浏览器,总是报这样一个错误: Uncaught TypeError: Cannot read property 'canvas' of null. 细看之下是无法获取WebGL上下 ...

  7. get传递中文产生乱码的解决方式汇总

    1 最基本的乱码问题. 这个乱码问题是最简单的乱码问题.一般新会出现.就是页面编码不一致导致的乱码. <%@ page language="java" pageEncodin ...

  8. Ubuntu安装出现左上角光标一直闪解决方式

    Ubuntu安装出现左上角光标一直闪解决方式: 01下载ubunu http://cn.ubuntu.com/download/ 02.软碟通 http://pan.baidu.com/s/1qY8O ...

  9. https 页面中引入 http 资源的解决方式

    相对协议 应用场景 浏览器默认是不允许在 https 里面引用 http 资源的,一般都会弹出提示框. 用户确认后才会继续加载,用户体验非常差. 而且如果在一个 https 页面里动态的引入 http ...

随机推荐

  1. EntityFramework5.0CodeFirst全面学习

    Code First 约定 借助 CodeFirst,可通过使用 C# 或Visual Basic .NET 类来描述模型.模型的基本形状可通过约定来检测.约定是规则集,用于在使用 Code Firs ...

  2. ASP.NET 各种缓存

    原文地址:http://www.cnblogs.com/ltp/archive/2009/06/30/1514311.html   有时候总听到网友说网站运行好慢,不知如何是好:有时候也总见到一些朋友 ...

  3. ThreadContext

    //#define UseThreadContext using System; using System.Collections.Generic; using System.Linq; using ...

  4. noip2012普及组——质因数分解

    [问题描述]已知正整数 n 是两个不同的质数的乘积,试求出较大的那个质数. [输入]输入文件名为 prime.in.输入只有一行,包含一个正整数 n. [输出]输出文件名为 prime.out.输出只 ...

  5. childNodes、nodeName、nodeValue 以及 nodeType

    nodeName.nodeValue 以及 nodeType 包含有关于节点的信息. nodeName 属性含有某个节点的名称. 元素节点的 nodeName 是标签名称属性节点的 nodeName ...

  6. 解决IE11出现异常SCRIPT5011:不能执行已释放Script的代码

    功能概述: 最近做了一个教育科研系统,由于时间比较紧,所以能集成的功能都尽量做到了一起,其中一个上传附件的功能,在基类控制器BaseController 中建了一个Action返回视图,其他需要上传附 ...

  7. html之br标签

    <br>:自闭合 一般用法: 标签会告诉浏览器立即停止当前的文本流,并在下一行的左边继续输出,也通常用来在相临的段落之间制造一段垂直的间距. 代码: 效果: 问题:当段落中有表格或图片时怎 ...

  8. html之head,base,meta,title

    一个简单的HTML最基本的必须的元素 用于定义文档的头部,是所有头部元素的容器.头部描述了文档的各种属性和信息,绝大多数头部的数据都不会直接显示给读者. 下面这些标签可用在head部分:base,li ...

  9. 阅读layim代码小记,实现可以更改用户签名的方法

    用layim原版的时候发现,用户的签名是不能直接修改的,如下: 其实要改也很简单,查看一下源代码,然后加一个input进去,可是,加完之后是这样的: 没关系,给它一个样式,让它乖乖的“隐藏“起来. / ...

  10. SQL 查询本月无数据用上个月的数据问题

    SQL 查询本月无数据用上个月的数据 前言 因为标题有长度限制,先简要说明一下应用场景.比如我们要查一段时间范围内(2013-08-01至2013-12-31)每个月每个运营商的用户总量,每个运营商用 ...