Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,15 @@ private Optional<SpdxPackage> createMavenModulePackage(
currentRepoUri = taskExtension.mapRepoUri(currentRepoUri, moduleId);
}

// An artifact resolved from a local repository (mavenLocal(), or
// maven { url = uri("file:...") }) has no location a consumer can fetch it from.
// Its file: URL is neither a valid SPDX download location nor a usable purl
// repository_url, so treat the repository as unknown: the null path below already
// renders that as NOASSERTION with no package-manager external reference.
Comment on lines +366 to +370

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This comment is too verbose.

if (currentRepoUri != null && "file".equals(currentRepoUri.getScheme())) {
currentRepoUri = null;
}

if (dependencyFiles.size() == 1) {
return Optional.of(
createFlatMavenPackage(
Expand Down