Klasse ComponentBomTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.ant.cyclonedx.ComponentBomTask
- Alle implementierten Schnittstellen:
Cloneable
public class ComponentBomTask
extends org.apache.tools.ant.Task
Task that creates CycloneDX BOMs for a single component.
-
Feldübersicht
Von Klasse geerbte Felder org.apache.tools.ant.Task
target, taskName, taskType, wrapperVon Klasse geerbte Felder org.apache.tools.ant.ProjectComponent
description, location, project -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifikator und TypMethodeBeschreibungvoidAdds another component to the SBOM.voidAdds a license to the SBOM's metadata.voidAdds component to be added to the metadata.tools section of the SBOM.Sets the component for the SBOM.Sets the manufacturer of the SBOM.org.apache.tools.ant.types.resources.UnionAccepts arbitrary file-system only resources that will be added as components of type file.Sets the supplier of the SBOM.voidexecute()voidsetBomName(String bomName) Sets the base name of the generated BOM.voidsetFormat(OutputFormat format) Which serialization format of CycloneDX SBOM to use.voidSets the output directory for the generated SBOM.voidsetSpecVersion(SpecVersion specVersion) Specifies the CycloneDX version to use.voidsetUseComponentManufacturer(boolean useComponentManufacturer) Whether to use the manufacturer of the main component as manufacturer for the BOM as well.voidsetUseComponentSupplier(boolean useComponentSupplier) Whether to use the supplier of the main component as supplier for the BOM as well.Von Klasse geerbte Methoden org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeVon Klasse geerbte Methoden org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Konstruktordetails
-
ComponentBomTask
public ComponentBomTask()
-
-
Methodendetails
-
setSpecVersion
Specifies the CycloneDX version to use.Defaults to 1.6.
- Parameter:
specVersion- specification version
-
setFormat
Which serialization format of CycloneDX SBOM to use.- Parameter:
format- output format
-
setBomName
Sets the base name of the generated BOM.The file name will be the base name plus the extension of the .
- Parameter:
bomName- base name of generated file
-
setOutputDirectory
Sets the output directory for the generated SBOM.- Parameter:
f- output directory
-
setUseComponentSupplier
public void setUseComponentSupplier(boolean useComponentSupplier) Whether to use the supplier of the main component as supplier for the BOM as well.- Parameter:
useComponentSupplier- whether to use supplier of component for the BOM
-
setUseComponentManufacturer
public void setUseComponentManufacturer(boolean useComponentManufacturer) Whether to use the manufacturer of the main component as manufacturer for the BOM as well.- Parameter:
useComponentManufacturer- whether to use manufacturer of component for the BOM
-
createComponent
Sets the component for the SBOM.- Gibt zurück:
- container for main component
-
createManufacturer
Sets the manufacturer of the SBOM.At most one manufacturer can be set.
- Gibt zurück:
- manufaturer of SBOM
-
createSupplier
Sets the supplier of the SBOM.At most one supplier can be set.
- Gibt zurück:
- supplier of SBOM
-
addConfiguredLicense
Adds a license to the SBOM's metadata.- Parameter:
l- SBOM's license
-
addAdditionalComponent
Adds another component to the SBOM.- Parameter:
c- component to be added to SBOM
-
addToolComponent
Adds component to be added to the metadata.tools section of the SBOM.This is meant to be used by tools that have also taken part in the generation of this SBOM.
- Parameter:
c- component to be added to tools
-
createPureFileComponents
public org.apache.tools.ant.types.resources.Union createPureFileComponents()Accepts arbitrary file-system only resources that will be added as components of type file.- Gibt zurück:
- container for pure file components
-
execute
public void execute()- Setzt außer Kraft:
executein Klasseorg.apache.tools.ant.Task
-