public abstract class BaseCycloneDxMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected static String |
MESSAGE_CALCULATING_HASHES |
protected static String |
MESSAGE_CREATING_BOM |
protected static String |
MESSAGE_RESOLVING_DEPS
Various messages sent to console.
|
protected static String |
MESSAGE_VALIDATING_BOM |
protected static String |
MESSAGE_VALIDATION_FAILURE |
protected static String |
MESSAGE_WRITING_BOM |
| Constructor and Description |
|---|
BaseCycloneDxMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected Set<org.cyclonedx.model.ext.dependencyGraph.Dependency> |
buildDependencyGraph(Set<String> componentRefs) |
protected org.cyclonedx.model.Component |
convert(org.apache.maven.artifact.Artifact artifact)
Converts a Maven artifact (dependency or transitive dependency) into a
CycloneDX component./
|
protected void |
execute(Set<org.cyclonedx.model.Component> components,
Set<org.cyclonedx.model.ext.dependencyGraph.Dependency> dependencies) |
String[] |
getExcludeTypes()
Returns if excluded types are defined.
|
Boolean |
getIncludeBomSerialNumber()
Returns if the resulting BOM should contain a unique serial number.
|
protected Boolean |
getIncludeCompileScope()
Returns if compile scoped artifacts should be included in bom.
|
Boolean |
getIncludeDependencyGraph()
Returns if dependency graph should be included in bom.
|
protected Boolean |
getIncludeProvidedScope()
Returns if provided scoped artifacts should be included in bom.
|
protected Boolean |
getIncludeRuntimeScope()
Returns if runtime scoped artifacts should be included in bom.
|
protected Boolean |
getIncludeSystemScope()
Returns if system scoped artifacts should be included in bom.
|
protected Boolean |
getIncludeTestScope()
Returns if test scoped artifacts should be included in bom.
|
protected org.apache.maven.project.MavenProject |
getProject()
Returns a reference to the current project.
|
protected List<org.apache.maven.project.MavenProject> |
getReactorProjects()
Returns the list of Maven Projects in this build.
|
String |
getSchemaVersion()
Returns the CycloneDX schema version the BOM will comply with.
|
org.apache.maven.execution.MavenSession |
getSession() |
protected Boolean |
getSkip()
Returns if CycloneDX execution should be skipped.
|
protected void |
logParameters() |
protected boolean |
shouldInclude(org.apache.maven.artifact.Artifact artifact) |
getLog, getPluginContext, setLog, setPluginContextprotected static final String MESSAGE_RESOLVING_DEPS
protected static final String MESSAGE_CREATING_BOM
protected static final String MESSAGE_CALCULATING_HASHES
protected static final String MESSAGE_WRITING_BOM
protected static final String MESSAGE_VALIDATING_BOM
protected static final String MESSAGE_VALIDATION_FAILURE
public org.apache.maven.execution.MavenSession getSession()
protected org.apache.maven.project.MavenProject getProject()
@Component MavenProject project; defined then the abstract
class (i.e. this class) will not have access to the current project (just
the way Maven works with the binding).protected List<org.apache.maven.project.MavenProject> getReactorProjects()
public String getSchemaVersion()
public Boolean getIncludeBomSerialNumber()
protected Boolean getIncludeCompileScope()
protected Boolean getIncludeProvidedScope()
protected Boolean getIncludeRuntimeScope()
protected Boolean getIncludeTestScope()
protected Boolean getIncludeSystemScope()
public Boolean getIncludeDependencyGraph()
public String[] getExcludeTypes()
protected Boolean getSkip()
protected boolean shouldInclude(org.apache.maven.artifact.Artifact artifact)
protected org.cyclonedx.model.Component convert(org.apache.maven.artifact.Artifact artifact)
artifact - the artifact to convertprotected void execute(Set<org.cyclonedx.model.Component> components, Set<org.cyclonedx.model.ext.dependencyGraph.Dependency> dependencies) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected Set<org.cyclonedx.model.ext.dependencyGraph.Dependency> buildDependencyGraph(Set<String> componentRefs) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void logParameters()
Copyright © 2017–2020 CycloneDX. All rights reserved.