Package net.shibboleth.idp.admin.impl
Class JarCheckCLI
- java.lang.Object
-
- net.shibboleth.ext.spring.cli.AbstractCommandLine<T>
-
- net.shibboleth.idp.cli.AbstractIdPHomeAwareCommandLine<JarCheckArguments>
-
- net.shibboleth.idp.admin.impl.JarCheckCLI
-
public final class JarCheckCLI extends net.shibboleth.idp.cli.AbstractIdPHomeAwareCommandLine<JarCheckArguments>
Program to check for potential jar clashes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.shibboleth.ext.spring.cli.AbstractCommandLine
AbstractCommandLine.TerminalCodes
-
-
Field Summary
Fields Modifier and Type Field Description private List<String>distJarsJar files Distributions .private org.slf4j.LoggerlogLogger.private List<String>pluginJarsJar files Plugin Folder.private List<String>webAppJarsJar files in edit-webapp.-
Fields inherited from class net.shibboleth.ext.spring.cli.AbstractCommandLine
ARGS_PROPERTY, RC_INIT, RC_IO, RC_OK, RC_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description JarCheckCLI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddAndCheck(Map<String,String> allNames, List<String> jars, String source, String type)Add the names to the Map, checking for already existing.private voiddetailed(JarCheckArguments args)Do a detailed check.protected intdoRun(JarCheckArguments args)private voidfileNamesOnly(JarCheckArguments args)Do a general test.protected Class<JarCheckArguments>getArgumentClass()protected org.slf4j.LoggergetLogger()protected StringgetVersion()private voidlistAndExactCheck(JarCheckArguments args)Check for the same file in two places and if asked for.private List<String>listJars(Path webapp)return a list of all the files in the lib file below the webapp folder provided.private voidloadJarFiles(JarCheckArguments args)static voidmain(String[] args)CLI entry point.private List<String>normalize(List<String> fileNames)make the file names look more 'usual'.private voidprocessClassNames(Map<String,String> namesSoFar, Path jar)List all the class names in the jar provided.private voidprocessClassNames(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.ext.spring.cli.AbstractCommandLine
getAdditionalSpringResources, getApplicationContext, initLogging, run, setContextInitializer
-
-
-
-
Method Detail
-
loadJarFiles
private void loadJarFiles(JarCheckArguments args)
- Parameters:
args- the arguments
-
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 mapjars- the namessource- where the jar came fromtype- what we are checking
-
getArgumentClass
protected Class<JarCheckArguments> getArgumentClass()
- Specified by:
getArgumentClassin classAbstractCommandLine<JarCheckArguments>
-
getVersion
protected String getVersion()
- Specified by:
getVersionin classAbstractCommandLine<JarCheckArguments>
-
getLogger
protected org.slf4j.Logger getLogger()
- Specified by:
getLoggerin classAbstractCommandLine<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 foundbase- The directory where the names livejars- 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 foundjar- The far file
-
doRun
protected int doRun(@Nonnull JarCheckArguments args)- Overrides:
doRunin classnet.shibboleth.idp.cli.AbstractIdPHomeAwareCommandLine<JarCheckArguments>
-
main
public static void main(@Nonnull String[] args)CLI entry point.- Parameters:
args- arguments
-
-