Package org.apache.ivy
Class Main
java.lang.Object
org.apache.ivy.Main
Class used to launch ivy as a standalone tool.
Valid arguments can be obtained with the -? argument.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidconfigureURLHandler(String realm, String host, String username, String passwd) private static voidParses thecpoption from the command line, and returns a list ofFile.(package private) static CommandLineParserprivate static URIgetSettingsURI(String settingsPath) private static voidinitMessage(CommandLine line, Ivy ivy) private static IvySettingsinitSettings(CommandLine line, Ivy ivy) private static voidinvoke(Ivy ivy, File cache, ModuleDescriptor md, String[] confs, List<File> fileList, String mainclass, String[] args) static voidprivate static voidoutputCachePath(Ivy ivy, File cache, ModuleDescriptor md, String[] confs, String outFile) static ResolveReportA method that allows to run embedded Ivy as if it were launched from CLI (e.g., for use with REPL in Java 9+).private static ResolveReport(package private) static voidrun(CommandLineParser parser, String[] args) private static ResolveReportrun(CommandLine line, boolean isCli) private static voidusage(CommandLineParser parser, boolean showDeprecated)
-
Field Details
-
HELP_WIDTH
private static final int HELP_WIDTH- See Also:
-
-
Constructor Details
-
Main
private Main()
-
-
Method Details
-
getParser
-
main
- Throws:
Exception
-
run
A method that allows to run embedded Ivy as if it were launched from CLI (e.g., for use with REPL in Java 9+).- Parameters:
args- an array of command line arguments- Returns:
- null if asked for usage or version, or if anything fails during resolve, publish or launch; a ResolveReport on success
- Throws:
Exception- if something goes wrong
-
run
- Throws:
Exception
-
run
- Throws:
Exception
-
run
- Throws:
Exception
-
getExtraClasspathFileList
Parses thecpoption from the command line, and returns a list ofFile.All the files contained in the returned List exist, non existing files are simply skipped with a warning.
- Parameters:
line- the command line in which the cp option should be parsed- Returns:
- a List of files to include as extra classpath entries, or
nullif no cp option was provided.
-
initSettings
private static IvySettings initSettings(CommandLine line, Ivy ivy) throws ParseException, IOException, ParseException - Throws:
ParseExceptionIOExceptionParseException
-
getSettingsURI
-
initMessage
-
outputCachePath
private static void outputCachePath(Ivy ivy, File cache, ModuleDescriptor md, String[] confs, String outFile) -
invoke
-
configureURLHandler
-
error
- Throws:
ParseException
-
usage
-