Open shi9qiu opened 2 years ago
@shi9qiu I ran into the same issue - I believe it is related to the working directory.
I too used ./spdx-sbom-generator --path /path/to/java/project
and got the same error response.
To fix my issue I move the executable (spdx-sbom-generator) into my java project top level directory and ran the command again without the --path flag and it worked. cd /path/to/java/project && ./spdx-sbom-generator
So sounds like there is a bug where this "mvn dependency:tree" command is being run in the pwd of the executable and not in the path specified by the --path flag.
Is there a permanent fix in the plans for this issue?
Thanks!
Hello,
I got an error message "error in getting mvn transitive dependency tree and parsing it" when I tried to generator from a simple Maven project:
Did anyone get the same error message before?
I checked the source code:
https://github.com/spdx/spdx-sbom-generator/blob/90ec05b20557e3cda6fd12cf214ad02b83c02f87/pkg/modules/javamaven/handler.go#L119-L135 and: https://github.com/spdx/spdx-sbom-generator/blob/90ec05b20557e3cda6fd12cf214ad02b83c02f87/pkg/modules/javamaven/decoder.go#L427-L444
Then I run "mvn dependency:tree" command and it was successful. So I have no idea about what is wrong here. I will be very thankful if anyone can solve my problem.