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
Comment From: philwebb
I'm not sure that we should downgrade at this point as this really feels like something that should be fixed in the Maven plugin. Flagging to see what the team think.
In the meantime, you can also add this to your pom.xml:
<properties>
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
</properties>
Comment From: snicoll
I agree that we shouldn’t downgrade. Affected users should as Phil pointed out.
Comment From: mhalbritter
I agree.
Comment From: jabrena
Oki, I will continue the conversation in the JIRA ticket not closed for this particular plugin.
- https://issues.apache.org/jira/browse/MDEPLOY-318
I propose not close this ticket meanwhile the ticket related to this open issue is not closed in the plugin. Maybe other consumers will update to 3.3.x soon and maybe others will have this kind of issue.
https://spring.io/projects/spring-boot#support
Many thanks for your quick feedback, always is appreciated :)
Comment From: snicoll
Thanks for the suggestion but as it is, this issue is no longer actionable.