错误“无法传输状态代码为409的文件* .jar".尽管转移了 [英] Error "Failed to transfer file *.jar with status code 409" despite transfered
问题描述
我正在尝试发布一个天蓝色的项目,项目pom就是这样
I'm trying to release a project to azure artefacts, the project pom is like this
<?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] [错误]无法在项目sftp-service上执行目标org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy(默认部署):ArtifactDeployerException:无法部署工件:无法从/到re-release传输工件sftp-service:jar:1.0.1( 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 状态码为409-> [帮助1]
[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]
当我查看存储库时,可以看到该软件包已成功上传
When I look at the repository, I can see that the package is uploaded successfully
推荐答案
尽管已传输,但错误无法传输状态代码为409的文件* .jar"
Error "Failed to transfer file *.jar with status code 409" despite transfered
根据pom和错误日志,您似乎正在尝试将快照版本部署到仅发行版本的存储库中.
According to the pom and error log, it seems you are trying to deploy a snapshot version into a release only repository.
在pom中,设置为<version>1.0.2-SNAPSHOT</version>
,但是在错误日志中,将工件部署为 repo-release .因此发生了冲突.
In your pom, you are set the <version>1.0.2-SNAPSHOT</version>
, but in the error log, you are deploy artifacts to repo-release. Hence the conflict.
要解决此问题,请尝试在您的pom.xml
中选择一个快照存储库而不是一个发行版,或者为您的发行版本选择一个发行库而不是快照库.
To resolve this issue, please try to select a snapshot repository instead of a release one in your pom.xml
or select a release library rather than the snapshot library for your release version.
检查此线程有关更多详细信息.
Check this thread for some more details.
希望这会有所帮助.
这篇关于错误“无法传输状态代码为409的文件* .jar".尽管转移了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!