Skip to content

Treat Maven manifest versions as resolved dependencies - #226

Merged
andrew merged 1 commit into
git-pkgs:mainfrom
abhinavgautam01:fix/java-lockfile-187
Jun 5, 2026
Merged

andrew merged 1 commit into
git-pkgs:mainfrom
abhinavgautam01:fix/java-lockfile-187

Conversation

@abhinavgautam01

Copy link
Copy Markdown
Contributor

Summary

fixes #187 by treating Maven manifest dependencies with explicit versions as resolved dependencies, similar to Go modules...

Changes

  • Includes Maven dependencies in isResolvedDependency when they have a concrete requirement.
  • Adds coverage for Maven manifest dependencies in outdated.
  • Adds focused tests for resolved dependency classification.

Verification

  • go test ./cmd -run 'Resolved|Maven|OutdatedUsesMaven'
  • go test ./...
  • go tool golangci-lint run ./cmd --tests=false

@andrew andrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Targeted, well-scoped fix: adding maven alongside golang in isResolvedDependency is the right call — pom.xml deps carry concrete versions like Go module requires, so they should flow through outdated/vulns/funding/freshness/deprecated the same way. Tests cover both the helper (positive, negative, range-version cases) and the end-to-end outdated --ecosystem maven path from #187.

One thought for later (not a blocker): the golang || maven allowlist will keep growing as more pin-by-default ecosystems come up (Gradle, csproj PackageReference, etc.). At some point it may be worth swapping the ecosystem check for a "requirement looks pinned, not ranged" predicate, but that's a bigger refactor and out of scope here.

@andrew
andrew merged commit 5c511c7 into git-pkgs:main Jun 5, 2026
4 checks passed
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.

Some commands may be dependent on lockfiles and therefore may not work on Java

2 participants