错误 "Failed to transfer file *.jar with status code 409" 尽管已转移

Error "Failed to transfer file *.jar with status code 409" despite transfered

我正在尝试发布一个项目到azure artefacts,项目pom是这样的

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
    <groupId>groupId</groupId>
    <artifactId>parent</artifactId>
    <version>1.0.1</version>
</parent>
<groupId>groupId.groupId</groupId>
<artifactId>sftp-service</artifactId>
<version>1.0.2-SNAPSHOT</version>
<packaging>bwmodule</packaging>


<dependencies>
    <dependency>
        <groupId>groupId</groupId>
        <artifactId>sftp-api</artifactId>
        <version>1.0.5</version>
    </dependency>
</dependencies>

<build>
    <sourceDirectory>src</sourceDirectory>
    <outputDirectory>target/classes</outputDirectory>
    <plugins>
        <plugin>
            <groupId>com.tibco.plugins</groupId>
            <artifactId>bw6-maven-plugin</artifactId>
            <extensions>true</extensions>
        </plugin>
    </plugins>
</build>

<scm>
    <developerConnection>scm:git:https://url_to_git_repo</developerConnection>
  <tag>HEAD</tag>

执行时

mvn release:perform

我遇到以下错误

[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) on project sftp-service: ArtifactDeployerException: Failed to deploy artifacts: Could not transfer artifact sftp-service:jar:1.0.1 from/to repo-release (https://pkgs.dev.azure.com/groupename/_packaging/repo-release/maven/v1): Failed to transfer file https://pkgs.dev.azure.com/groupename/_packaging/repo-release/maven/v1/up/coop/esb/sftp-service/1.0.1/sftp-service-1.0.1.jar with status code 409 -> [Help 1]

当我查看存储库时,我可以看到包已成功上传

Error “Failed to transfer file *.jar with status code 409” despite transfered

根据 pom 和错误日志,您似乎正在尝试将快照版本部署到仅发布存储库中。

在您的 pom 中,您设置了 <version>1.0.2-SNAPSHOT</version>,但在错误日志中,您将工件部署到 repo-release。因此发生了冲突。

要解决此问题,请尝试 select 快照存储库而不是 pom.xml 中的发行版或 select 发行库而不是发行版的快照库版本。

查看 了解更多详情。

希望这对您有所帮助。