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.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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user