Fix SNAPSHOT metadata: deploy POM and JAR together#566
Merged
staticlibs merged 2 commits intoduckdb:mainfrom Feb 12, 2026
Merged
Fix SNAPSHOT metadata: deploy POM and JAR together#566staticlibs merged 2 commits intoduckdb:mainfrom
staticlibs merged 2 commits intoduckdb:mainfrom
Conversation
Each `mvn deploy:deploy-file` call creates a new build number in the SNAPSHOT metadata. Deploying POM and JAR separately means they get different build numbers (e.g. POM=1, JAR=2). Dependency resolvers like Coursier/sbt pick the JAR's build number and try to find the POM at the same number, which returns 404. Fix: use `-DpomFile` when deploying the main JAR so Maven publishes both artifacts in a single operation with the same build number.
Collaborator
|
Thanks! It looks good to me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem
Each
mvn deploy:deploy-filecall creates a new build number in the SNAPSHOTmaven-metadata.xml. The current script deploys POM and JAR as separate calls:Dependency resolvers like Coursier (used by sbt/Scala) pick the JAR's build number from the metadata and then try to find the POM at the same build number. Since the POM was deployed with build number 1 but Coursier looks for it at build number 2, the download returns 404:
Fix
Deploy the main JAR with
-DpomFile=<path>instead of deploying the POM separately. This way Maven publishes both artifacts in a single operation, giving them the same build number and timestamp.Test plan
sbt/ Coursier can resolve the SNAPSHOT dependency without errors