Skip to content

refactor(maven): modularize parser internals#814

Merged
abraemer merged 27 commits intomainfrom
cleanup/maven-pom-submodule
Apr 29, 2026
Merged

refactor(maven): modularize parser internals#814
abraemer merged 27 commits intomainfrom
cleanup/maven-pom-submodule

Conversation

@abraemer
Copy link
Copy Markdown
Collaborator

Summary

  • replace the monolithic Maven parser with focused submodules for POM parsing, manifests, properties, shared coordinates, and split test files
  • split POM state by domain, restore templated collection metadata resolution that was lost during the refactor, and extract shared META-INF/maven/... plus Maven URL/purl helpers
  • narrow pom/state module boundaries so context.rs stays transition-focused and state/mod.rs relies on smaller intent-level child APIs

Scope and exclusions

  • Included: structural Maven parser refactors, the missing templated repository/plugin-repository/mailing-list resolution fix, shared coordinate/URL helper extraction, and import-boundary cleanup
  • Explicit exclusions: no new parser surfaces, no intentional output-shape changes, and no follow-up enhancement yet for developer/contributor party-field property resolution

Intentional differences from Python

  • None intended beyond restoring the pre-refactor templated collection metadata resolution behavior that regressed on this branch.

Follow-up work

  • Created or intentionally deferred: developer/contributor property resolution remains a separate follow-up if we want to expand Maven property substitution coverage further.

Validation

  • cargo test maven::pom_test::tests:: --quiet
  • cargo test maven::manifest_test:: --quiet
  • cargo test maven::properties_test:: --quiet
  • cargo test maven::scan_test::tests:: --quiet
  • cargo test --features golden-tests maven_golden --quiet
  • cargo test --features golden-tests test_assembly_maven_basic --quiet
  • cargo test --features golden-tests test_assembly_maven_meta_inf_basic --quiet
  • real-target metadata-only benchmark and result comparison against current main on apache/felix-dev @ 20aee77 covering pom.xml, *.pom, pom.properties, and MANIFEST.MF
  • semantic diff on that target was empty after normalizing run-specific package_uid UUIDs; package counts matched exactly at 196
  • performance on that target was effectively neutral versus main (branch 12.167s vs main 12.328s uncached-cold, identical 12.155s/12.157s uncached-repeat, identical warm incremental behavior)

abraemer added 27 commits April 27, 2026 14:16
Group the POM, manifest, properties, and test surfaces under src/parsers/maven so the large Maven parser follows the ADR-backed nested parser structure and is easier to extend safely.

Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
Signed-off-by: Adrian Braemer <bradrian@gmail.com>
@abraemer abraemer merged commit 63b9bb1 into main Apr 29, 2026
15 checks passed
@abraemer abraemer deleted the cleanup/maven-pom-submodule branch April 29, 2026 06:36
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.

1 participant