Class JarCheckCLI


public final class JarCheckCLI
extends AbstractIdPHomeAwareCommandLine<JarCheckArguments>
Program to check for potential jar clashes.
  • Field Details

    • log

      @Nullable private org.slf4j.Logger log
      Logger.
    • webAppJars

      @Nonnull private List<String> webAppJars
      Jar files in edit-webapp.
    • pluginJars

      @Nonnull private List<String> pluginJars
      Jar files Plugin Folder.
    • distJars

      @Nonnull private List<String> distJars
      Jar files Distributions .
  • Constructor Details

    • JarCheckCLI

      public JarCheckCLI()
  • Method Details

    • loadJarFiles

      private void loadJarFiles​(JarCheckArguments args)
      Parameters:
      args -
    • listJars

      private List<String> listJars​(Path webapp)
      return a list of all the files in the lib file below the webapp folder provided.
      Parameters:
      webapp - folder to start at.
      Returns:
      the list of names as a strung
    • listAndExactCheck

      private void listAndExactCheck​(JarCheckArguments args)
      Check for the same file in two places and if asked for. output the sorted list
      Parameters:
      args -
    • addAndCheck

      private void addAndCheck​(Map<String,​String> allNames, List<String> jars, String source, String type)
      Add the names to the Map, checking for already existing.
      Parameters:
      allNames - the map
      jars - the names
      source - where the jar came from
      type - what we are checking
    • getArgumentClass

      protected Class<JarCheckArguments> getArgumentClass()
      Specified by:
      getArgumentClass in class AbstractCommandLine<JarCheckArguments>
    • getVersion

      protected String getVersion()
      Specified by:
      getVersion in class AbstractCommandLine<JarCheckArguments>
    • getLogger

      protected org.slf4j.Logger getLogger()
      Specified by:
      getLogger in class AbstractCommandLine<JarCheckArguments>
    • fileNamesOnly

      private void fileNamesOnly​(JarCheckArguments args)
      Do a general test.
      Parameters:
      args -
    • normalize

      private List<String> normalize​(List<String> fileNames)
      make the file names look more 'usual'.
      Parameters:
      fileNames -
      Returns:
      the processed names
    • detailed

      private void detailed​(JarCheckArguments args)
      Do a detailed check.
      Parameters:
      args -
    • processClassNames

      private void processClassNames​(Map<String,​String> namesSoFar, Path base, List<String> jars)
      Look at all the class names in the jars provided.
      Parameters:
      namesSoFar - the class names we have found
      base - The directory where the names live
      jars - The Jar Names
    • processClassNames

      private void processClassNames​(Map<String,​String> namesSoFar, Path jar)
      List all the class names in the jar provided.
      Parameters:
      namesSoFar - the class names we have found
      jar - The far file
    • doRun

      protected int doRun​(@Nonnull JarCheckArguments args)
      Overrides:
      doRun in class AbstractIdPHomeAwareCommandLine<JarCheckArguments>
    • main

      public static void main​(@Nonnull String[] args)
      CLI entry point.
      Parameters:
      args - arguments