Maven 3 和时间戳

标签 maven timestamp maven-3 nexus

我有关于 Maven 3 和 Nexus 存储库的各种问题。在我们的 nexus 存储库中,我只想解决时间戳依赖项。也就是说,我想阻止将时间戳依赖项下载到我的本地存储库。而且在我的 nexus 配置中,只有一个版本的最新快照 jar 完全没问题。

我的问题是关于 nexus 和本地存储库的时间戳依赖项。

  • 在存储库中只有最新的快照是一种好习惯吗?为什么或者为什么不?
  • 我已经在部署插件的父 pom 的插件管理部分完成了 <uniqueVersion>false</uniqueVersion>但是在 hudson,我仍然继续在 jar 上看到这样的时间戳 bundle-service-client-1.0-20110209.145744-25
  • 我在另一个问题中遇到了评论,

  • The timestamped artifacts should never be see inside your local (~/.m2/repository) repository. If they are, something is wrong.



    为什么?

    最佳答案

    引自 Maven 3.x Compatibility Notes 中的相关部分

    The setting false for a distribution repository has no effect in version 3.x, snapshot artifacts will always be deployed using a timestamped version.



    另外,请查看 this nexus jira bug 中的评论对您的其他问题的一个很好的解释。

    关于Maven 3 和时间戳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7739566/

    相关文章:

    maven-3 - 在maven中仅发布子模块的新版本

    maven - 使用最新的依赖快照?

    Maven shade-plugin重定位不更新资源文件中的条目

    maven - 错误 : Unable to locate tools. jar 。预计在/usr/lib/jvm/java-6-sun-1.6.0.26/lib/tools.jar中找到

    ruby - 如何使用 Ruby 解析以 little-endian 格式给出的 64 位整数时间戳?

    java - Ant signjar 任务时间戳太长

    swift - 如何在 ios 中将数据类型声明为时间戳 - swift

    java - maven 和 gradle 构建中的依赖 jar 版本不同

    java - Maven 依赖冲突仅在 Eclipse 中发生

    java - 无法在我的 pom.xml 中找到 Maven clean 插件