Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support use of Maven to resolve all dependencies. #2669

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

GijsCalis
Copy link
Contributor

@GijsCalis GijsCalis commented Feb 24, 2024

  1. Use Maven application to resolve all dependencies, including from parent poms and Maven BOM's. This is done using Maven to generate an 'effective-pom' in which all dependencies and their versions are fully resolved. See README.md#L723 for more details on the workings.
  2. Small improvement of resolution of groupId and version for modules. For modules, when these are missing in the pom.xml the groupId and/or version of the parent are used syft/pkg/cataloger/java/parse_pom_xml.go#L265
  3. Some minor fixes and additions to logging to ease debugging.

fixes #2017, fixes #1129, fixes #1813

A side note: I've also got a pretty good idea on how to fix many of the issues above without running Maven. But this takes some more time because parent poms and BOMs will need to be traversed. It is unlikely to be completely fail-safe, but should improve the cataloging greatly and fix/improve many outstanding issues.

@GijsCalis GijsCalis force-pushed the use-maven-generate-effective-pom branch 2 times, most recently from fe4e17d to 6880a0e Compare February 24, 2024 16:57
Signed-off-by: Gijs Calis <gijs.calis@triopsys.nl>

Signed-off-by: Gijs Calis <51088038+GijsCalis@users.noreply.github.com>
@GijsCalis GijsCalis force-pushed the use-maven-generate-effective-pom branch from 6880a0e to ab5525f Compare February 24, 2024 17:00
@GijsCalis
Copy link
Contributor Author

BTW, this is my first attempt at programming in Go. So I'm certainly open to (and prepared for :-) feedback.

@willmurphyscode
Copy link
Contributor

Note to reviewers: This looks like a special case of #1562, and we should consider the configuration and user experience Syft would need if there were multiple such implementations, e.g. is there a single switch to turn on and off external tooling?

Signed-off-by: Gijs Calis <51088038+GijsCalis@users.noreply.github.com>
Signed-off-by: Gijs Calis <51088038+GijsCalis@users.noreply.github.com>
@spiffcs spiffcs removed their assignment Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Stalled
4 participants