Class JarCheckCLI


  • public final class JarCheckCLI
    extends net.shibboleth.idp.cli.AbstractIdPHomeAwareCommandLine<JarCheckArguments>
    Program to check for potential jar clashes.
    • Field Detail

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

      • JarCheckCLI

        public JarCheckCLI()
    • Method Detail

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

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