public class Grape
extends Object
Facade to GrapeEngine.
| Modifiers | Name | Description |
|---|---|---|
static String |
AUTO_DOWNLOAD_SETTING |
Argument key for the auto-download setting. |
static String |
DISABLE_CHECKSUMS_SETTING |
Argument key for the disable-checksums setting. |
static String |
SYSTEM_PROPERTIES_SETTING |
Argument key for additional system properties. |
protected static GrapeEngine |
instance |
Lazily created grape engine instance. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static void |
addResolver(Map<String, Object> args)Adds a resolver to the shared grape engine. |
|
public static Map<String, Map<String, List<String>>> |
enumerateGrapes()Enumerates locally available grapes. |
|
public static boolean |
getDisableChecksums()Global flag to ignore checksums. |
|
public static boolean |
getEnableAutoDownload()This is a static access auto download enabler. |
|
public static boolean |
getEnableGrapes()This is a static access kill-switch. |
|
public static GrapeEngine |
getInstance()Returns the shared grape engine instance. |
|
public static void |
grab(String endorsed)Grabs a dependency expressed using the endorsed module shorthand. |
|
public static void |
grab(Map<String, Object> dependency)Grabs a single dependency. |
|
public static void |
grab(Map<String, Object> args, Map dependencies)Grabs one or more dependencies using the supplied arguments. |
|
public static Map[] |
listDependencies(ClassLoader cl)Lists dependencies associated with the supplied class loader. |
|
public static URI[] |
resolve(Map<String, Object> args, Map dependencies)Resolves dependency coordinates to URIs. |
|
public static URI[] |
resolve(Map<String, Object> args, List depsInfo, Map dependencies)Resolves dependency coordinates to URIs while optionally collecting dependency information. |
|
public static void |
setDisableChecksums(boolean disableChecksums)Set global flag to ignore checksums. |
|
public static void |
setEnableAutoDownload(boolean enableAutoDownload)This is a static access auto download enabler. |
|
public static void |
setEnableGrapes(boolean enableGrapes)This is a static access kill-switch. |
Argument key for the auto-download setting.
Argument key for the disable-checksums setting.
Argument key for additional system properties.
Lazily created grape engine instance.
Adds a resolver to the shared grape engine.
args - the resolver descriptorEnumerates locally available grapes.
Global flag to ignore checksums. By default, it is set to false.
This is a static access auto download enabler. It will set the 'autoDownload' value to the passed in arguments map if not already set. If 'autoDownload' is set the value will not be adjusted.
This applies to the grab and resolve calls.
If it is set to false, only previously downloaded grapes will be used. This may cause failure in the grape call if the library has not yet been downloaded
If it is set to true, then any jars not already downloaded will automatically be downloaded. Also, any versions expressed as a range will be checked for new versions and downloaded (with dependencies) if found.
By default, it is set to true.
This is a static access kill-switch. All the static shortcut methods in this class will be disabled if this property is set to false. By default, it is set to true.
Returns the shared grape engine instance.
null if grapes are unavailableGrabs a dependency expressed using the endorsed module shorthand.
endorsed - the endorsed module notationGrabs a single dependency.
dependency - the dependency descriptorGrabs one or more dependencies using the supplied arguments.
args - grab argumentsdependencies - dependency descriptorsLists dependencies associated with the supplied class loader.
cl - the class loader to inspectResolves dependency coordinates to URIs.
args - resolve argumentsdependencies - dependency descriptorsResolves dependency coordinates to URIs while optionally collecting dependency information.
args - resolve argumentsdepsInfo - optional dependency metadata sinkdependencies - dependency descriptorsSet global flag to ignore checksums. By default, it is set to false.
This is a static access auto download enabler. It will set the 'autoDownload' value to the passed in arguments map if not already set. If 'autoDownload' is set the value will not be adjusted.
This applies to the grab and resolve calls.
If it is set to false, only previously downloaded grapes will be used. This may cause failure in the grape call if the library has not yet been downloaded.
If it is set to true, then any jars not already downloaded will automatically be downloaded. Also, any versions expressed as a range will be checked for new versions and downloaded (with dependencies) if found. By default, it is set to true.
This is a static access kill-switch. All the static shortcut methods in this class will be disabled if this property is set to false. By default, it is set to true.