Package org.cyclonedx.maven
Class CycloneDxPackageMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.cyclonedx.maven.BaseCycloneDxMojo
-
- org.cyclonedx.maven.CycloneDxPackageMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="makePackageBom", defaultPhase=PACKAGE, threadSafe=true, aggregator=true, requiresOnline=true) public class CycloneDxPackageMojo extends BaseCycloneDxMojoCreates a CycloneDX BOM for each Maven module withwarorearpackaging.- Since:
- 2.4.0
-
-
Field Summary
-
Fields inherited from class org.cyclonedx.maven.BaseCycloneDxMojo
detectUnusedForOptionalScope, MESSAGE_ATTACHING_BOM, MESSAGE_CREATING_BOM, MESSAGE_RESOLVING_AGGREGATED_DEPS, MESSAGE_RESOLVING_DEPS, MESSAGE_VALIDATION_FAILURE, MESSAGE_WRITING_BOM
-
-
Constructor Summary
Constructors Constructor Description CycloneDxPackageMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringextractComponentsAndDependencies(Set<String> topLevelComponents, Map<String,org.cyclonedx.model.Component> components, Map<String,org.cyclonedx.model.Dependency> dependencies)Analyze the current Maven project to extract the BOM components list and their dependencies.protected booleanshouldInclude(org.apache.maven.project.MavenProject mavenProject)-
Methods inherited from class org.cyclonedx.maven.BaseCycloneDxMojo
convert, execute, extractBOMDependencies, generatePackageUrl, getProject, logAdditionalParameters, logParameters, populateComponents, schemaVersion
-
-
-
-
Method Detail
-
shouldInclude
protected boolean shouldInclude(org.apache.maven.project.MavenProject mavenProject)
-
extractComponentsAndDependencies
protected String extractComponentsAndDependencies(Set<String> topLevelComponents, Map<String,org.cyclonedx.model.Component> components, Map<String,org.cyclonedx.model.Dependency> dependencies) throws org.apache.maven.plugin.MojoExecutionException
Description copied from class:BaseCycloneDxMojoAnalyze the current Maven project to extract the BOM components list and their dependencies.- Specified by:
extractComponentsAndDependenciesin classBaseCycloneDxMojo- Parameters:
topLevelComponents- the PURLs for all top level componentscomponents- the components map to filldependencies- the dependencies map to fill- Returns:
- the name of the analysis done to store as a BOM, or
nullto not save result. - Throws:
org.apache.maven.plugin.MojoExecutionException- something weird happened...
-
-