resolve issue #818

This commit is contained in:
Jeremy Long
2017-07-23 07:11:47 -04:00
parent 12d74510cd
commit e975ba5199
3 changed files with 19 additions and 10 deletions

View File

@@ -35,8 +35,17 @@ public class SuppressionFile {
* *
* @param text the simple content. * @param text the simple content.
*/ */
public final void addText(String text) { //public final void addConfigured(String text) {
this.path = text; // this.path = text;
//}
/**
* Sets the path to the suppression file.
*
* @param path
*/
public void setPath(String path) {
this.path = path;
} }
/** /**

View File

@@ -17,8 +17,7 @@ the project's dependencies.
<dependency-check projectname="Hello World" <dependency-check projectname="Hello World"
reportoutputdirectory="${basedir}" reportoutputdirectory="${basedir}"
reportformat="ALL"> reportformat="ALL">
<suppressionfile path="${basedir}/path/to/suppression.xml" />
<suppressionfile>path/to/suppression.xml</suppressionfile>
<fileset dir="lib"> <fileset dir="lib">
<include name="**/*.jar"/> <include name="**/*.jar"/>
</fileset> </fileset>
@@ -46,12 +45,13 @@ proxyUsername | Defines the proxy user name.
proxyPassword | Defines the proxy password. | &nbsp; proxyPassword | Defines the proxy password. | &nbsp;
connectionTimeout | The URL Connection Timeout. | &nbsp; connectionTimeout | The URL Connection Timeout. | &nbsp;
enableExperimental | Enable the [experimental analyzers](../analyzers/index.html). If not enabled the experimental analyzers (see below) will not be loaded or used. | false enableExperimental | Enable the [experimental analyzers](../analyzers/index.html). If not enabled the experimental analyzers (see below) will not be loaded or used. | false
suppressionFile | The file path to the XML suppression file \- used to suppress [false positives](../general/suppression.html). | &nbsp;
The following nested elements can be set on the dependency-check task. The following nested elements can be set on the dependency-check task.
Property | Description | Default Value Element | Property | Description | Default Value
----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------- ------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------
suppressionFile | The file path to the XML suppression file \- used to suppress [false positives](../general/suppression.html). Element can be specified multiple times. | &nbsp; suppressionFile | path | The file path to the XML suppression file \- used to suppress [false positives](../general/suppression.html). Element can be specified multiple times. | &nbsp;
Analyzer Configuration Analyzer Configuration
==================== ====================

View File

@@ -78,8 +78,8 @@
reportOutputDirectory="${project.build.directory}/suppression-report.html" reportOutputDirectory="${project.build.directory}/suppression-report.html"
autoupdate="false" autoupdate="false"
failBuildOnCVSS="3"> failBuildOnCVSS="3">
<suppressionfile>${project.build.directory}/test-classes/test-suppression1.xml</suppressionfile> <suppressionfile path="${project.build.directory}/test-classes/test-suppression1.xml" />
<suppressionfile>${project.build.directory}/test-classes/test-suppression2.xml</suppressionfile> <suppressionfile path="${project.build.directory}/test-classes/test-suppression2.xml" />
<fileset dir="${project.build.directory}/test-classes/jars"> <fileset dir="${project.build.directory}/test-classes/jars">
<include name="axis-1.4.jar"/> <include name="axis-1.4.jar"/>
</fileset> </fileset>
@@ -107,7 +107,7 @@
autoupdate="false" autoupdate="false"
failBuildOnCVSS="3" failBuildOnCVSS="3"
suppressionFile="${project.build.directory}/test-classes/test-suppression1.xml"> suppressionFile="${project.build.directory}/test-classes/test-suppression1.xml">
<suppressionfile>${project.build.directory}/test-classes/test-suppression2.xml</suppressionfile> <suppressionfile path="${project.build.directory}/test-classes/test-suppression2.xml"/>
<fileset dir="${project.build.directory}/test-classes/jars"> <fileset dir="${project.build.directory}/test-classes/jars">
<include name="axis-1.4.jar"/> <include name="axis-1.4.jar"/>
</fileset> </fileset>