mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-17 23:04:07 +01:00
added option to change the name of the report per issue #389
This commit is contained in:
@@ -29,6 +29,7 @@ import org.apache.maven.plugin.MojoExecutionException;
|
|||||||
import org.apache.maven.plugin.MojoFailureException;
|
import org.apache.maven.plugin.MojoFailureException;
|
||||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
import org.apache.maven.plugins.annotations.Mojo;
|
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.plugins.annotations.ResolutionScope;
|
||||||
import org.apache.maven.project.MavenProject;
|
import org.apache.maven.project.MavenProject;
|
||||||
import org.owasp.dependencycheck.analyzer.DependencyBundlingAnalyzer;
|
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
|
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.
|
* Returns the report name.
|
||||||
*
|
*
|
||||||
@@ -269,7 +277,7 @@ public class AggregateMojo extends BaseDependencyCheckMojo {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getName(Locale locale) {
|
public String getName(Locale locale) {
|
||||||
return "dependency-check:aggregate";
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import org.apache.maven.plugin.MojoExecutionException;
|
|||||||
import org.apache.maven.plugin.MojoFailureException;
|
import org.apache.maven.plugin.MojoFailureException;
|
||||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
import org.apache.maven.plugins.annotations.Mojo;
|
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.plugins.annotations.ResolutionScope;
|
||||||
import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
|
import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
|
||||||
import org.owasp.dependencycheck.utils.Settings;
|
import org.owasp.dependencycheck.utils.Settings;
|
||||||
@@ -89,6 +90,13 @@ public class CheckMojo extends BaseDependencyCheckMojo {
|
|||||||
Settings.cleanup();
|
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.
|
* Returns the report name.
|
||||||
*
|
*
|
||||||
@@ -97,7 +105,7 @@ public class CheckMojo extends BaseDependencyCheckMojo {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getName(Locale locale) {
|
public String getName(Locale locale) {
|
||||||
return "dependency-check";
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -14,15 +14,16 @@ The following properties can be set on the dependency-check-maven plugin.
|
|||||||
|
|
||||||
Property | Description | Default Value
|
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
|
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'
|
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
|
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
|
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) |
|
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
|
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
|
Analyzer Configuration
|
||||||
====================
|
====================
|
||||||
|
|||||||
Reference in New Issue
Block a user