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 void
configureURLHandler
(String realm, String host, String username, String passwd) private static void
Parses thecp
option from the command line, and returns a list ofFile
.(package private) static CommandLineParser
private static URI
getSettingsURI
(String settingsPath) private static void
initMessage
(CommandLine line, Ivy ivy) private static IvySettings
initSettings
(CommandLine line, Ivy ivy) private static void
invoke
(Ivy ivy, File cache, ModuleDescriptor md, String[] confs, List<File> fileList, String mainclass, String[] args) static void
private static void
outputCachePath
(Ivy ivy, File cache, ModuleDescriptor md, String[] confs, String outFile) static ResolveReport
A 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 void
run
(CommandLineParser parser, String[] args) private static ResolveReport
run
(CommandLine line, boolean isCli) private static void
usage
(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 thecp
option 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
null
if no cp option was provided.
-
initSettings
private static IvySettings initSettings(CommandLine line, Ivy ivy) throws ParseException, IOException, ParseException - Throws:
ParseException
IOException
ParseException
-
getSettingsURI
-
initMessage
-
outputCachePath
private static void outputCachePath(Ivy ivy, File cache, ModuleDescriptor md, String[] confs, String outFile) -
invoke
-
configureURLHandler
-
error
- Throws:
ParseException
-
usage
-