In the following config, I made a typo and inserted a space before Person
packageSupplier.set(" Person: Brice Dutheil")
The full error
> Task :jufmt-lib:spdxSbomForJufmtLibRelease FAILED
spdx sboms require a version but project: jufmt-lib has no specified version
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':jufmt-lib:spdxSbomForJufmtLibRelease'.
> org.spdx.library.InvalidSPDXAnalysisException: Value must start with one of NOASSERTION, Person:, Organization:
It seems that either the plugin doesn't trim properly the value to be inserted, and/or the error reporting is wrong.
Full config
spdxSbom {
targets {
// create a target named "release",
// this is used for the task name (spdxSbomFor<SBOM name>)
// and output file (<SBOM name>.spdx.json)
create("jufmtLibRelease") {
// configure here
configurations.set(listOf("compileClasspath")) // compilationClasspath
scm {
tool.set("git")
uri.set("https://github.com/bric3/jufmt.git")
revision.set(
providers.environmentVariable("GITHUB_SHA")
.orElse(providers.of(GitHeadSource::class) {})
)
}
document {
name.set("jufmt-lib")
creator.set("Person: Brice Dutheil")
packageSupplier.set(" Person: Brice Dutheil")
// NOTE: The namespace URI does not have to be accessible. It is only intended to provide a universally unique ID.
// Although this property looks like a HTTP URL, it is in fact not. Technically speaking, a URL defined a Location, where as a URI defines an Identifier (i.e. the name by which something is known)
namespace.set("https://github.com/bric3/jufmt/${UUID.randomUUID()}")
}
}
}
}
In the following config, I made a typo and inserted a space before
PersonThe full error
It seems that either the plugin doesn't trim properly the value to be inserted, and/or the error reporting is wrong.
Full config
spdxSbom { targets { // create a target named "release", // this is used for the task name (spdxSbomFor<SBOM name>) // and output file (<SBOM name>.spdx.json) create("jufmtLibRelease") { // configure here configurations.set(listOf("compileClasspath")) // compilationClasspath scm { tool.set("git") uri.set("https://github.com/bric3/jufmt.git") revision.set( providers.environmentVariable("GITHUB_SHA") .orElse(providers.of(GitHeadSource::class) {}) ) } document { name.set("jufmt-lib") creator.set("Person: Brice Dutheil") packageSupplier.set(" Person: Brice Dutheil") // NOTE: The namespace URI does not have to be accessible. It is only intended to provide a universally unique ID. // Although this property looks like a HTTP URL, it is in fact not. Technically speaking, a URL defined a Location, where as a URI defines an Identifier (i.e. the name by which something is known) namespace.set("https://github.com/bric3/jufmt/${UUID.randomUUID()}") } } } }