mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-18 23:34:15 +01:00
corrected argument name for the purge nvd option
This commit is contained in:
@@ -19,6 +19,7 @@ package org.owasp.dependencycheck;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.apache.commons.cli.CommandLine;
|
import org.apache.commons.cli.CommandLine;
|
||||||
import org.apache.commons.cli.CommandLineParser;
|
import org.apache.commons.cli.CommandLineParser;
|
||||||
@@ -217,7 +218,7 @@ public final class CliParser {
|
|||||||
final Option noUpdate = new Option(ARGUMENT.DISABLE_AUTO_UPDATE_SHORT, ARGUMENT.DISABLE_AUTO_UPDATE,
|
final Option noUpdate = new Option(ARGUMENT.DISABLE_AUTO_UPDATE_SHORT, ARGUMENT.DISABLE_AUTO_UPDATE,
|
||||||
false, "Disables the automatic updating of the CPE data.");
|
false, "Disables the automatic updating of the CPE data.");
|
||||||
|
|
||||||
final Option projectName = OptionBuilder.withArgName("name").hasArg().withLongOpt(ARGUMENT.PROJECT)
|
final Option projectName = OptionBuilder.hasArg().withArgName("name").withLongOpt(ARGUMENT.PROJECT)
|
||||||
.withDescription("The name of the project being scanned. This is a required argument.")
|
.withDescription("The name of the project being scanned. This is a required argument.")
|
||||||
.create();
|
.create();
|
||||||
|
|
||||||
@@ -229,7 +230,7 @@ public final class CliParser {
|
|||||||
final Option excludes = OptionBuilder.withArgName("pattern").hasArg().withLongOpt(ARGUMENT.EXCLUDE)
|
final Option excludes = OptionBuilder.withArgName("pattern").hasArg().withLongOpt(ARGUMENT.EXCLUDE)
|
||||||
.withDescription("Specify and exclusion pattern. This option can be specified multiple times"
|
.withDescription("Specify and exclusion pattern. This option can be specified multiple times"
|
||||||
+ " and it accepts Ant style excludsions.")
|
+ " and it accepts Ant style excludsions.")
|
||||||
.create();
|
.create("p");
|
||||||
|
|
||||||
final Option props = OptionBuilder.withArgName("file").hasArg().withLongOpt(ARGUMENT.PROP)
|
final Option props = OptionBuilder.withArgName("file").hasArg().withLongOpt(ARGUMENT.PROP)
|
||||||
.withDescription("A property file to load.")
|
.withDescription("A property file to load.")
|
||||||
@@ -265,9 +266,9 @@ public final class CliParser {
|
|||||||
|
|
||||||
options.addOptionGroup(og)
|
options.addOptionGroup(og)
|
||||||
.addOptionGroup(exog)
|
.addOptionGroup(exog)
|
||||||
|
.addOption(projectName)
|
||||||
.addOption(out)
|
.addOption(out)
|
||||||
.addOption(outputFormat)
|
.addOption(outputFormat)
|
||||||
.addOption(projectName)
|
|
||||||
.addOption(version)
|
.addOption(version)
|
||||||
.addOption(help)
|
.addOption(help)
|
||||||
.addOption(advancedHelp)
|
.addOption(advancedHelp)
|
||||||
@@ -394,7 +395,7 @@ public final class CliParser {
|
|||||||
final Option disableNexusAnalyzer = OptionBuilder.withLongOpt(ARGUMENT.DISABLE_NEXUS)
|
final Option disableNexusAnalyzer = OptionBuilder.withLongOpt(ARGUMENT.DISABLE_NEXUS)
|
||||||
.withDescription("Disable the Nexus Analyzer.").create();
|
.withDescription("Disable the Nexus Analyzer.").create();
|
||||||
|
|
||||||
final Option purge = OptionBuilder.withLongOpt(ARGUMENT.PROJECT)
|
final Option purge = OptionBuilder.withLongOpt(ARGUMENT.PURGE_NVD)
|
||||||
.withDescription("Purges the local NVD data cache")
|
.withDescription("Purges the local NVD data cache")
|
||||||
.create();
|
.create();
|
||||||
|
|
||||||
@@ -450,7 +451,7 @@ public final class CliParser {
|
|||||||
.withDescription("The proxy url argument is deprecated, use proxyserver instead.")
|
.withDescription("The proxy url argument is deprecated, use proxyserver instead.")
|
||||||
.create();
|
.create();
|
||||||
final Option appName = OptionBuilder.withArgName("name").hasArg().withLongOpt(ARGUMENT.APP_NAME)
|
final Option appName = OptionBuilder.withArgName("name").hasArg().withLongOpt(ARGUMENT.APP_NAME)
|
||||||
.withDescription("The name of the project being scanned. This is a required argument.")
|
.withDescription("The name of the project being scanned.")
|
||||||
.create(ARGUMENT.APP_NAME_SHORT);
|
.create(ARGUMENT.APP_NAME_SHORT);
|
||||||
|
|
||||||
options.addOption(proxyServer);
|
options.addOption(proxyServer);
|
||||||
@@ -727,9 +728,11 @@ public final class CliParser {
|
|||||||
public String getProjectName() {
|
public String getProjectName() {
|
||||||
String appName = line.getOptionValue(ARGUMENT.APP_NAME);
|
String appName = line.getOptionValue(ARGUMENT.APP_NAME);
|
||||||
String name = line.getOptionValue(ARGUMENT.PROJECT);
|
String name = line.getOptionValue(ARGUMENT.PROJECT);
|
||||||
|
LOGGER.error("PROJECT NAME: " + line.getOptionValue(ARGUMENT.PROJECT));
|
||||||
|
|
||||||
if (name == null && appName != null) {
|
if (name == null && appName != null) {
|
||||||
name = appName;
|
name = appName;
|
||||||
LOGGER.warn("The '" + ARGUMENT.APP_NAME + "' should no longer be used; use '" + ARGUMENT.PROJECT + "' instead.");
|
LOGGER.warn("The '" + ARGUMENT.APP_NAME + "' argument should no longer be used; use '" + ARGUMENT.PROJECT + "' instead.");
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user