mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-17 23:04:07 +01:00
added nexus configuration options
Former-commit-id: 101000a61f23b67ef8c311bff2c543cfa34fb584
This commit is contained in:
@@ -203,6 +203,14 @@ public final class CliParser {
|
|||||||
.withDescription("The file path to the suppression XML file.")
|
.withDescription("The file path to the suppression XML file.")
|
||||||
.create(ArgumentName.SUPPRESION_FILE_SHORT);
|
.create(ArgumentName.SUPPRESION_FILE_SHORT);
|
||||||
|
|
||||||
|
final Option disableNexusAnalyzer = OptionBuilder.withLongOpt(ArgumentName.DISABLE_NEXUS)
|
||||||
|
.withDescription("Disable the Nexus Analyzer.")
|
||||||
|
.create();
|
||||||
|
|
||||||
|
final Option nexusUrl = OptionBuilder.withArgName("url").hasArg().withLongOpt(ArgumentName.NEXUS_URL)
|
||||||
|
.withDescription("The url to the Nexus Server.")
|
||||||
|
.create();
|
||||||
|
|
||||||
final OptionGroup og = new OptionGroup();
|
final OptionGroup og = new OptionGroup();
|
||||||
og.addOption(path);
|
og.addOption(path);
|
||||||
|
|
||||||
@@ -223,6 +231,8 @@ public final class CliParser {
|
|||||||
opts.addOption(proxyUsername);
|
opts.addOption(proxyUsername);
|
||||||
opts.addOption(proxyPassword);
|
opts.addOption(proxyPassword);
|
||||||
opts.addOption(connectionTimeout);
|
opts.addOption(connectionTimeout);
|
||||||
|
opts.addOption(disableNexusAnalyzer);
|
||||||
|
opts.addOption(nexusUrl);
|
||||||
|
|
||||||
return opts;
|
return opts;
|
||||||
}
|
}
|
||||||
@@ -254,6 +264,28 @@ public final class CliParser {
|
|||||||
return (line != null) && isValid && line.hasOption(ArgumentName.SCAN);
|
return (line != null) && isValid && line.hasOption(ArgumentName.SCAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the disableNexus command line argument was specified.
|
||||||
|
*
|
||||||
|
* @return true if the disableNexus command line argument was specified; otherwise false
|
||||||
|
*/
|
||||||
|
public boolean isNexusDisabled() {
|
||||||
|
return (line != null) && line.hasOption(ArgumentName.DISABLE_NEXUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the url to the nexus server if one was specified.
|
||||||
|
*
|
||||||
|
* @return the url to the nexus server; if none was specified this will return null;
|
||||||
|
*/
|
||||||
|
public String getNexusUrl() {
|
||||||
|
if (line == null || !line.hasOption(ArgumentName.NEXUS_URL)) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return line.getOptionValue(ArgumentName.NEXUS_URL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays the command line help message to the standard output.
|
* Displays the command line help message to the standard output.
|
||||||
*/
|
*/
|
||||||
@@ -544,6 +576,15 @@ public final class CliParser {
|
|||||||
* The CLI argument name for setting the location of the suppression file.
|
* The CLI argument name for setting the location of the suppression file.
|
||||||
*/
|
*/
|
||||||
public static final String SUPPRESION_FILE = "suppression";
|
public static final String SUPPRESION_FILE = "suppression";
|
||||||
|
/**
|
||||||
|
* Disables the Nexus Analyzer.
|
||||||
|
*/
|
||||||
|
public static final String DISABLE_NEXUS = "disableNexus";
|
||||||
|
/**
|
||||||
|
* The URL of the nexus server.
|
||||||
|
*/
|
||||||
|
public static final String NEXUS_URL = "nexus";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The short CLI argument name for setting the location of the suppression file.
|
* The short CLI argument name for setting the location of the suppression file.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user