Package org.owasp.dependencycheck
Class App
- java.lang.Object
-
- org.owasp.dependencycheck.App
-
public class App extends java.lang.Object
The command line interface for the DependencyCheck application.- Author:
- Jeremy Long
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
ensureCanonicalPath(java.lang.String path)
Takes a path and resolves it to be a canonical & absolute path.static void
main(java.lang.String[] args)
The main method for the application.protected void
populateSettings(CliParser cli)
Updates the global Settings.int
run(java.lang.String[] args)
Main CLI entry-point into the application.
-
-
-
Constructor Detail
-
App
public App()
Builds the App object.
-
App
protected App(Settings settings)
Builds the App object; this method is used for testing.- Parameters:
settings
- the configured settings
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
The main method for the application.- Parameters:
args
- the command line arguments
-
run
public int run(java.lang.String[] args)
Main CLI entry-point into the application.- Parameters:
args
- the command line arguments- Returns:
- the exit code to return
-
populateSettings
protected void populateSettings(CliParser cli) throws InvalidSettingException
Updates the global Settings.- Parameters:
cli
- a reference to the CLI Parser that contains the command line arguments used to set the corresponding settings in the core engine.- Throws:
InvalidSettingException
- thrown when a user defined properties file is unable to be loaded.
-
ensureCanonicalPath
protected java.lang.String ensureCanonicalPath(java.lang.String path)
Takes a path and resolves it to be a canonical & absolute path. The caveats are that this method will take an Ant style file selector path (../someDir/**\/*.jar) and convert it to an absolute/canonical path (at least to the left of the first * or ?).- Parameters:
path
- the path to canonicalize- Returns:
- the canonical path
-
-