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.
*/
public final void addText(String text) {
this.path = text;
//public final void addConfigured(String 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"
reportoutputdirectory="${basedir}"
reportformat="ALL">
<suppressionfile>path/to/suppression.xml</suppressionfile>
<suppressionfile path="${basedir}/path/to/suppression.xml" />
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
@@ -46,12 +45,13 @@ proxyUsername | Defines the proxy user name.
proxyPassword | Defines the proxy password. | &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
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.
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;
Element | Property | Description | Default Value
------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------
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
====================

View File

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