Skip to content

addDependencyRelationships function crashes on missing transitive Maven dependency in SPDX report generation #869

Description

@volodya-lombrozo

I'm getting this in CI when ORT generates the SPDX report:

Exception in thread "main" java.util.NoSuchElementException: Key (Identifier(type=Maven, namespace=com.jcabi, name=jcabi-xml, version=0.35.0), Identifier(type=Maven, namespace=com.jcabi, name=jcabi-log, version=0.24.3)) is missing in the map.
	at org.ossreviewtoolkit.plugins.reporters.spdx.SpdxDocumentModelMapper.map$addDependencyRelationships(SpdxDocumentModelMapper.kt:74)
	at org.ossreviewtoolkit.plugins.reporters.spdx.SpdxDocumentModelMapper.map(SpdxDocumentModelMapper.kt:125)
	at org.ossreviewtoolkit.plugins.reporters.spdx.SpdxDocumentReporter.generateReport(SpdxDocumentReporter.kt:124)

ORT's addDependencyRelationships looks up the jcabi-xml → jcabi-log edge in its packages map, but the transitive dependency is missing from it and the whole report generation fails.

Metadata

Metadata

Labels

bugSomething isn't workinggood-titleThe title was checked and improved by ChatGPT

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions