Class 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 BaseCycloneDxMojo
    Creates a CycloneDX BOM for each Maven module with war or ear packaging.
    Since:
    2.4.0
    • Constructor Detail

      • CycloneDxPackageMojo

        public CycloneDxPackageMojo()
    • 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: BaseCycloneDxMojo
        Analyze the current Maven project to extract the BOM components list and their dependencies.
        Specified by:
        extractComponentsAndDependencies in class BaseCycloneDxMojo
        Parameters:
        topLevelComponents - the PURLs for all top level components
        components - the components map to fill
        dependencies - the dependencies map to fill
        Returns:
        the name of the analysis done to store as a BOM, or null to not save result.
        Throws:
        org.apache.maven.plugin.MojoExecutionException - something weird happened...