-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Description
Hi,
Last week, we experimented an issue upgrading a Spring Boot project to the version 3.3.4 in the maven goal to deploy artifacts into JFROG Artifactory & Azure Packages with a set custom Spring Boot Starter libraries.
_[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.1.3:deploy (default-cli) on project sdk-parent: Failed to deploy artifacts: Could not transfer artifact sdk-parent:pom:0.1.0 from/to releases (https://my-domain.com/artifactory/libs-releases): transfer failed for https://my-domain/artifactory/libs-releases/sdk-parent/0.1.0/sdk-parent-0.1.0.pom, status: 409 -> [Help 1]
[ERROR]
after several tests, we found the following issues reported previously:
- upgrade 3.2.6 corrupts published parent pom artifact · Issue #40952 · spring-projects/spring-boot (github.com)
- After upgrading, deploy:deploy uploads jars to a pom only endpoint · Issue #40919 · spring-projects/spring-boot (github.com)
- [MDEPLOY-318] version 3.1.2 is uploading jar files to wrong endpoints - ASF JIRA (apache.org)
and all tickets are related with deploy-maven-plugin plugin.
I would like to share that the issue persists in Spring Boot 3.3.4 for some scenarios where you release Parent POMs.
If you observe, Spring Boot add deploy-maven-plugin version 3.1.3 to developers, but latest version didn´t fix that issue.
I propose the action to downgrade deploy-maven-plugin to the version version 3.1.1 until the plugin is fixed:
https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-dependencies/build.gradle#L1272-L1281
Current workaround in Azure Pipelines which it is working for us:
- task: Maven@4
displayName: Deploy jar
inputs:
mavenPomFile: 'pom.xml'
goals: 'jar:jar org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy'
...
What do you think?
Many thanks in advance
Juan Antonio