简体   繁体   English

将依赖项的快照版本导入Maven存储库

[英]Importing a snapshot version of a dependency into Maven repository

I am having trouble importing dependencies for my Grails project into the company Nexus repository. 我在将Grails项目的依赖项导入公司Nexus存储库时遇到麻烦。 The Grails plugin I would like to use is events-push ( https://github.com/smaldini/grails-events-push ). 我想使用的Grails插件是events-push( https://github.com/smaldini/grails-events-push )。 The latest released version of the plugin is 1.0.M7. 该插件的最新发布版本是1.0.M7。 It uses a very old version of Atmosphere library. 它使用了非常旧的Atmosphere库版本。 The GutHub repository contains a more up-to-date version of events-push plugin, 1.0.0.BUILD-SNAPSHOT. GutHub存储库包含events-push插件1.0.0.BUILD-SNAPSHOT的最新版本。 I built the Grails plugin from the local clone of the repository and got it to work in my dev environment. 我从存储库的本地克隆构建了Grails插件,并使其可以在我的开发环境中工作。

To deploy it on the intranet (in the production environment) I need to import all the plugin dependencies into the company Nexus repository. 要将其部署在Intranet上(在生产环境中),我需要将所有插件依赖项导入公司Nexus存储库。 This is where I run into trouble. 这就是我遇到麻烦的地方。 The project depends on a SNAPSHOT version of events-push plugin, which in turn depends on SNAPSHOT version of other Grails plugins and Java libraries (according to dependency report). 该项目依赖于events-push插件的SNAPSHOT版本,而后者又依赖于其他Grails插件和Java库的SNAPSHOT版本(根据依赖关系报告)。

Nexus supports two types of repositories, Release and Snapshot. Nexus支持两种类型的存储库,即Release和Snapshot。 I can add artifacts to a Release repository (through the browser UI or in a batch mode using curl), but the artifact must not be a snapshot. 我可以将构件添加到发布存储库(通过浏览器UI或使用curl进行批处理),但是构件不能是快照。 I can change the repository to be a Snapshot repository, but then I lose the ability to add artifact to it through the browser or curl command. 我可以将存储库更改为快照存储库,但是随后我无法通过浏览器或curl命令向其添加工件。

How do I make these SNAPSHOT artifacts available to the Grails project through Maven? 如何通过Maven将这些SNAPSHOT工件提供给Grails项目?

将它们更改为发行版,然后将其部署到发行库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Gradle:根据Maven Local或Remote存储库中的最新版本解决SNAPSHOT依赖性 - Gradle: resolve SNAPSHOT-dependency based on most recent version in either Maven Local or Remote repository 如何在不手动触摸远程 maven 存储库的情况下更新 pom.xml SNAPSHOT 依赖项版本? - How to update pom.xml SNAPSHOT dependency version from remote maven repository without touching it manually? 使用漂亮的快照版本更新Maven依赖项属性 - Update Maven Dependency Properties With Pretty Snapshot Version 如何从 maven SNAPSHOT 存储库下载 SNAPSHOT 版本? - How to download SNAPSHOT version from maven SNAPSHOT repository? Maven 依赖管理正在导入错误的版本 - Maven Dependency Management is importing wrong version Maven 3不会从本地存储库更新快照依赖项 - Maven 3 does not update snapshot dependency from local repository 抑制本地存储库中的 maven 依赖版本后缀 - Suppress maven dependency version suffix in local repository 从 Gradle 中的 Maven Repository 获取最新的快照版本 - Get latest snapshot version from Maven Repository in Gradle Maven 快照依赖 - Maven snapshot dependency Maven依赖项快照版本号与nexus快照版本号相差1秒 - maven dependency snapshot version number is different from nexus snapshot version number by 1 second
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM