licenses can be attached to components in CycloneDX SBOMs. The
license elements can be used as top-level elements and be given
an id so they can be later referred to via
the refid attribute -
see the
Ant manual.
| Attribute | Description | Required |
|---|---|---|
| licenseId | The id of the license. Must be a valid SPDX identifier. | One of the three is required |
| name | The name of the license. | |
| expression | The license expression. since CycloneDX Antlib 0.2 |
Since CycloneDX Antlib 0.2 the Antlib will try to guess the
SPDX license from its name if the At most one
nested url-resource
named Below is a license referencing the license of this Antlib itself.name attribute is
used.
Nested elements
url
url can be used to specify the URL of the license.Examples
<cdx:license
licenseId="Apache-2.0"
id="apache-2"
xmlns:cdx="antlib:org.apache.ant.cyclonedx">
<url url="https://www.apache.org/licenses/LICENSE-2.0.txt"/>
</cdx:license>