Skip to content

Treat missing POMs for non-classpath dependencies as warnings#7163

Merged
sambsnyd merged 1 commit intomainfrom
Jenson3210/tgz-dep-resolution
Mar 27, 2026
Merged

Treat missing POMs for non-classpath dependencies as warnings#7163
sambsnyd merged 1 commit intomainfrom
Jenson3210/tgz-dep-resolution

Conversation

@Jenson3210
Copy link
Copy Markdown
Contributor

Summary

  • When a dependency's POM cannot be downloaded, Maven itself only logs a warning (The POM for ... is missing, no dependency information available) and continues the build. Our dependency resolution was treating this as a fatal MavenDownloadingExceptions, causing the entire LST build to fail.
  • For non-classpath artifact types (e.g. tgz, zip), we now skip the dependency on download failure instead of failing, matching Maven's behavior.

References

Test plan

  • Added unresolvableTgzDependencyShouldNotFailBuild test that verifies tgz dependencies with unreachable POMs don't produce a ParseExceptionResult
  • Existing siblingDependencyWithTgzPackagingAndSnapshot test still passes (tgz deps with available POMs still resolve)
  • Full rewrite-maven test suite passes

Maven itself only logs a warning when a dependency's POM cannot be
downloaded ("The POM for ... is missing, no dependency information
available") and continues the build. Our resolution was treating this
as a fatal error, causing the entire LST build to fail when e.g. tgz
dependencies lack a POM in the repository.

For non-classpath artifact types (tgz, zip, pom, bom), skip the
dependency on download failure instead of accumulating a fatal
exception, matching Maven's behavior.

Fixes moderneinc/customer-requests#2095
Copy link
Copy Markdown
Member

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense; thanks for linking the sources as well.

@github-project-automation github-project-automation bot moved this from In Progress to Ready to Review in OpenRewrite Mar 27, 2026
@sambsnyd sambsnyd merged commit 4ca8bcf into main Mar 27, 2026
1 check passed
@sambsnyd sambsnyd deleted the Jenson3210/tgz-dep-resolution branch March 27, 2026 22:59
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants