Package net.shibboleth.idp.cli.impl

# Class JarCheckCLI

java.lang.Object
net.shibboleth.shared.cli.AbstractCommandLine<T>
net.shibboleth.idp.cli.AbstractIdPHomeAwareCommandLine<JarCheckArguments>
net.shibboleth.idp.cli.impl.JarCheckCLI

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

## Nested Class Summary

## Nested classes/interfaces inherited from class net.shibboleth.shared.cli.AbstractCommandLine

`AbstractCommandLine.TerminalCodes`

## Field Summary

Fields
Modifier and Type
Field
Description
`private List<String>`
`distJars`
Jar files Distributions .
`private org.slf4j.Logger`
`log`
Logger.
`private List<String>`
`pluginJars`
Jar files Plugin Folder.
`private List<String>`
`webAppJars`
Jar files in edit-webapp.

### Fields inherited from class net.shibboleth.shared.cli.AbstractCommandLine

`ARGS_PROPERTY, RC_INIT, RC_IO, RC_MODULE, RC_OK, RC_UNKNOWN`

## Constructor Summary

Constructors
Constructor
Description
`JarCheckCLI()`

## Method Summary

Modifier and Type
Method
Description
`private void`
`addAndCheck(Map<String,String> allNames, List<String> jars, String source, String type)`
Add the names to the Map, checking for already existing.
`private void`
`detailed(JarCheckArguments args)`
Do a detailed check.
`protected int`
`doRun(JarCheckArguments args)`
`private void`
`fileNamesOnly(JarCheckArguments args)`
Do a general test.
`protected Class<JarCheckArguments>`
`getArgumentClass()`
`protected org.slf4j.Logger`
`getLogger()`
`protected String`
`getVersion()`
`private void`
`listAndExactCheck(JarCheckArguments args)`
Check for the same file in two places.
`private List<String>`
`listJars(Path webapp)`
return a list of all the files in the lib file below the webapp folder provided.
`private void`
`loadJarFiles(JarCheckArguments args)`
Populate `webAppJars`, `pluginJars` and `distJars`.
`static void`
`main(String[] args)`
CLI entry point.
`private List<String>`
`normalize(List<String> fileNames)`
make the file names look more 'usual'.
`private void`
`processClassNames(Map<String,String> namesSoFar, Path jar)`
List all the class names in the jar provided.
`private void`
`processClassNames(Map<String,String> namesSoFar, Path base, List<String> jars)`
Look at all the class names in the jars provided.

### Methods inherited from class net.shibboleth.idp.cli.AbstractIdPHomeAwareCommandLine

`getHttpClient, getHttpClientSecurityParameters`

### Methods inherited from class net.shibboleth.shared.cli.AbstractCommandLine

`getAdditionalSpringResources, getApplicationContext, initLogging, run, setCaseSensitiveOptions, setContextInitializer`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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)
Populate `webAppJars`, `pluginJars` and `distJars`.

Parameters:
  `args` - the arguments

### listJars

@Nonnull private List<String> listJars(@Nonnull 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(@Nonnull JarCheckArguments args)
Check for the same file in two places.

Parameters:
  `args` - the arguments to check

### addAndCheck

private void addAndCheck(@Nonnull 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

@Nonnull protected Class<JarCheckArguments> getArgumentClass()

Specified by:
  `getArgumentClass` in class `AbstractCommandLine<JarCheckArguments>`

### getVersion

@Nonnull protected String getVersion()

Specified by:
  `getVersion` in class `AbstractCommandLine<JarCheckArguments>`

### getLogger

@Nonnull protected org.slf4j.Logger getLogger()

Specified by:
  `getLogger` in class `AbstractCommandLine<JarCheckArguments>`

### fileNamesOnly

private void fileNamesOnly(@Nonnull JarCheckArguments args)
Do a general test.

Parameters:
  `args` - the arguments to check

### normalize

private List<String> normalize(List<String> fileNames)
make the file names look more 'usual'.

Parameters:
  `fileNames` - the files to look at
Returns:
  the processed names

### detailed

private void detailed(@Nonnull JarCheckArguments args)
Do a detailed check.

Parameters:
  `args` - the arguments to check

### processClassNames

private void processClassNames(@Nonnull Map<String,String> namesSoFar, @Nonnull Path base, @Nonnull 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(@Nonnull Map<String,String> namesSoFar, @Nonnull 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