Class App

java.lang.Object
org.owasp.dependencycheck.App

public class App extends Object
The command line interface for the DependencyCheck application.
Author:
Jeremy Long
  • Constructor Details

    • 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 Details

    • main

      public static void main(String[] args)
      The main method for the application.
      Parameters:
      args - the command line arguments
    • run

      public int run(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 String ensureCanonicalPath(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