简体   繁体   English

使用Snapshot策略在nexus工件上进行部署,但版本中没有SNAPSHOT字符串

[英]deploy on nexus artifacts with Snapshot policy but without SNAPSHOT string in version

apparently my Nexus is rejecting every deploy I throw at him if the artifact has not -SNAPSHOT in the version. 如果工件没有在版本中使用-SNAPSHOT,那么我的Nexus显然会拒绝我对他的所有部署。

Data: 数据:

  • name of the failing artifact: entando-core-engine-experiment-bundles_with_bootstrap.jar where experiment-bundles_with_bootstrap is the version as in the version element of the pom.xml 失败工件的名称:entando-core-engine-experiment-bundles_with_bootstrap.jar,其中实验-bundles_with_bootstrappom.xml的version元素中的版本
  • hosted repository policy on my Nexus: Snapshot, allow redeploy and so on (classic conf for snapshots) 在Nexus上托管的存储库策略:快照,允许重新部署等(快照的经典配置)
  • deployer: Jenkins 1.481 部署者:詹金斯1.481
  • same Jenkins job, but entando-core-engine- SNAPSHOT .jar ---> SUCCESS 詹金斯(Jenkins)的工作相同,但核心引擎SNAPSHOT .jar --->成功

I need this naming convention because I'm building one of the several experiments we run internally, as opposite to the canonical develop branch which produces a proper entando-core-engine-SNAPSHOT.jar 我需要这种命名约定,因为我正在构建我们内部运行的几个实验之一,这与产生适当的entando-core-engine-SNAPSHOT.jar的规范开发分支相反

Any advice? 有什么建议吗? I'm totally lost. 我完全迷路了。

The thing is that usually your Nexus is configured not to allow a redeployment of a release. 事实是,通常您的Nexus配置为不允许重新发布版本。 A release from Maven point of view is an artifact where it's version it NOT -SNAPSHOT . 从Maven的角度来看,发行版是一个工件,而不是它的版本-SNAPSHOT In contradiction a SNAPSHOT is intended to be deployed several times into nexus. 矛盾的是,SNAPSHOT打算多次部署到联系中。
This sounds like you don't using the release plugin of Maven nor the Release PLugin of Jenkins. 听起来您好像没有使用Maven的发布插件,也没有使用Jenkins的Release PLugin。

Nexus is a repository manager that uses different repository formats, with the main format being the Maven repository format. Nexus是一个存储库管理器,它使用不同的存储库格式,主要格式为Maven存储库格式。 Changing the names of artifacts on the server is not possible since it violates the format. 无法更改服务器上工件的名称,因为它违反了格式。 They have to be located in the directory structure established by groupId, artifactId and version and use the artifactId-version-classifier.packaging for the file names. 它们必须位于由groupId,artifactId和version建立的目录结构中,并使用artifactId-version-classifier.packaging作为文件名。

If you need a different file name on the server you have to look at a different repository format (bad idea). 如果在服务器上需要其他文件名,则必须查看其他存储库格式(不好的主意)。 If you need the filename on the client just download from the correct name and rename.. 如果您需要客户端上的文件名,请从正确的名称下载并重命名。

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

相关问题 如何在不必指定配置文件的情况下将多个maven工件部署到多个nexus存储库(包括快照存储库)? - How could I deploy multiple maven artifacts to multiple nexus repositories including snapshot repositories without having to specify a profile? 无法将快照工件部署到联系 - Not able to deploy snapshot artifact to nexus 在没有SNAPSHOT版本的发布版本之后部署Jenkins站点作业 - Deploy Jenkins site job after Release build without SNAPSHOT version nexus2artifactory Maven快照版本行为 - nexus2artifactory Maven Snapshot Version Behavior Nexus:查询快照版本的所有时间戳版本 - Nexus: query all timestamped versions of a snapshot version 未从Nexus加载Maven SNAPSHOT版本 - Maven SNAPSHOT version not loaded from Nexus Nexus Repository 3(NXRM3):删除快照任务而不删除带有时间戳的工件 - Nexus Repository 3 (NXRM3): Delete snapshot task not removing timestamped artifacts 部署SNAPSHOT版本-获取(时间戳)版本号 - Deploy SNAPSHOT version - get the (timestamped) version number 如何配置 Maven 项目以将快照和发布部署到 Nexus? - How to configure maven project to deploy both snapshot and releases to Nexus? 无法将Maven工件部署到快照/私有Cloudbees存储库 - Unable to deploy Maven artifacts to snapshot/private Cloudbees repository
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM