diff --git a/dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/AggregateMojo.java b/dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/AggregateMojo.java index 27a2f1566..99948b058 100644 --- a/dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/AggregateMojo.java +++ b/dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/AggregateMojo.java @@ -29,6 +29,7 @@ import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; import org.apache.maven.project.MavenProject; import org.owasp.dependencycheck.analyzer.DependencyBundlingAnalyzer; @@ -261,6 +262,13 @@ public class AggregateMojo extends BaseDependencyCheckMojo { return true; //aggregate always returns true for now - we can look at a more complicated/acurate solution later } + /** + * The name of the report in the site. + */ + @SuppressWarnings("CanBeFinal") + @Parameter(property = "name", defaultValue = "dependency-check:aggregate", required = true) + private String name = "dependency-check:aggregate"; + /** * Returns the report name. * @@ -269,7 +277,7 @@ public class AggregateMojo extends BaseDependencyCheckMojo { */ @Override public String getName(Locale locale) { - return "dependency-check:aggregate"; + return name; } /** diff --git a/dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/CheckMojo.java b/dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/CheckMojo.java index 5f16ee22c..f3197a31a 100644 --- a/dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/CheckMojo.java +++ b/dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/CheckMojo.java @@ -23,6 +23,7 @@ import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; import org.owasp.dependencycheck.data.nvdcve.DatabaseException; import org.owasp.dependencycheck.utils.Settings; @@ -89,6 +90,13 @@ public class CheckMojo extends BaseDependencyCheckMojo { Settings.cleanup(); } + /** + * The name of the report in the site. + */ + @SuppressWarnings("CanBeFinal") + @Parameter(property = "name", defaultValue = "dependency-check", required = true) + private String name = "dependency-check"; + /** * Returns the report name. * @@ -97,7 +105,7 @@ public class CheckMojo extends BaseDependencyCheckMojo { */ @Override public String getName(Locale locale) { - return "dependency-check"; + return name; } /** diff --git a/dependency-check-maven/src/site/markdown/configuration.md b/dependency-check-maven/src/site/markdown/configuration.md index 7bc6afcd7..2ea5937e1 100644 --- a/dependency-check-maven/src/site/markdown/configuration.md +++ b/dependency-check-maven/src/site/markdown/configuration.md @@ -14,15 +14,16 @@ The following properties can be set on the dependency-check-maven plugin. Property | Description | Default Value ---------------------|------------------------------------|------------------ -aggregate | Deprecated - use the aggregate goal instead. |   autoUpdate | Sets whether auto-updating of the NVD CVE/CPE data is enabled. It is not recommended that this be turned to false. | true outputDirectory | The location to write the report(s). Note, this is not used if generating the report as part of a `mvn site` build | 'target' failBuildOnCVSS | Specifies if the build should be failed if a CVSS score above a specified level is identified. The default is 11 which means since the CVSS scores are 0-10, by default the build will never fail. | 11 format | The report format to be generated (HTML, XML, VULN, ALL). This configuration option has no affect if using this within the Site plugin unless the externalReport is set to true. | HTML +name | The name of the report in the site | dependency-check or dependency-check:aggregate suppressionFile | The file path to the XML suppression file \- used to suppress [false positives](../general/suppression.html) |   -skipTestScope | Should be skip analysis for artifacts with Test Scope | true +skip | Skips the dependency-check analysis | false +skipTestScope | Should be skip analysis for artifacts with Test Scope | true skipProvidedScope | Should be skip analysis for artifacts with Provided Scope | false -skipRuntimeScope | Should be skip analysis for artifacts with Runtime Scope | false +skipRuntimeScope | Should be skip analysis for artifacts with Runtime Scope | false Analyzer Configuration ====================