Skip to content

fix: Use baseVersion for SNAPSHOT path/URL resolution in FileSystemChecksumCalculator#1507

Merged
LogFlames merged 2 commits intoresolve_url_snapshotfrom
copilot/sub-pr-1506
Feb 24, 2026
Merged

fix: Use baseVersion for SNAPSHOT path/URL resolution in FileSystemChecksumCalculator#1507
LogFlames merged 2 commits intoresolve_url_snapshotfrom
copilot/sub-pr-1506

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 24, 2026

Maven SNAPSHOT artifacts downloaded from remote repositories have a timestamped version (e.g. 1.0-20231010.123456-1) in their filename, but the local repository directory is named using the base version (1.0-SNAPSHOT). The old code used getVersion() for directory path/URL construction, causing lookups to fail for remotely-resolved SNAPSHOTs.

Changes

  • FileSystemChecksumCalculator: Use artifact.getBaseVersion() instead of artifact.getVersion() when constructing the remote repository URL path segment (directory uses base version; filename retains the timestamped version)
  • LockFileFacade: Use pluginArtifact.getBaseVersion() for the directory segment when resolving the local POM path for SNAPSHOT plugins
  • FileSystemChecksumCalculatorTest: Unit tests covering both cases:
    • SNAPSHOT artifact resolved URL uses baseVersion as directory (1.0-SNAPSHOT/my-artifact-1.0-20231010.123456-1.jar)
    • Non-SNAPSHOT artifact URL is unaffected
// Correct URL for a SNAPSHOT downloaded from remote:
https://repo.maven.apache.org/maven2/com/example/my-artifact/1.0-SNAPSHOT/my-artifact-1.0-20231010.123456-1.jar
//                                                             ^^^^^^^^^^^^ baseVersion as directory
//                                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ timestamped filename

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Fix path resolution using base version for SNAPSHOTs fix: Use baseVersion for SNAPSHOT path/URL resolution in FileSystemChecksumCalculator Feb 24, 2026
Copilot AI requested a review from algomaster99 February 24, 2026 10:10
@LogFlames LogFlames force-pushed the resolve_url_snapshot branch from d182e2b to bf3dff5 Compare February 24, 2026 10:54
Copilot AI and others added 2 commits February 24, 2026 17:46
@LogFlames LogFlames marked this pull request as ready for review February 24, 2026 16:46
@LogFlames LogFlames merged commit be75130 into resolve_url_snapshot Feb 24, 2026
10 checks passed
@LogFlames LogFlames deleted the copilot/sub-pr-1506 branch February 24, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants