Class Grape
- java.lang.Object
-
- groovy.grape.Grape
-
public class Grape extends java.lang.ObjectFacade to GrapeEngine.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAUTO_DOWNLOAD_SETTINGstatic java.lang.StringDISABLE_CHECKSUMS_SETTINGprotected static GrapeEngineinstancestatic java.lang.StringSYSTEM_PROPERTIES_SETTING
-
Constructor Summary
Constructors Constructor Description Grape()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddResolver(java.util.Map<java.lang.String,java.lang.Object> args)static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<java.lang.String>>>enumerateGrapes()static booleangetDisableChecksums()Global flag to ignore checksums.static booleangetEnableAutoDownload()This is a static access auto download enabler.static booleangetEnableGrapes()This is a static access kill-switch.static GrapeEnginegetInstance()static voidgrab(java.lang.String endorsed)static voidgrab(java.util.Map<java.lang.String,java.lang.Object> dependency)static voidgrab(java.util.Map<java.lang.String,java.lang.Object> args, java.util.Map... dependencies)static java.util.Map[]listDependencies(java.lang.ClassLoader cl)static java.net.URI[]resolve(java.util.Map<java.lang.String,java.lang.Object> args, java.util.List depsInfo, java.util.Map... dependencies)static java.net.URI[]resolve(java.util.Map<java.lang.String,java.lang.Object> args, java.util.Map... dependencies)static voidsetDisableChecksums(boolean disableChecksums)Set global flag to ignore checksums.static voidsetEnableAutoDownload(boolean enableAutoDownload)This is a static access auto download enabler.static voidsetEnableGrapes(boolean enableGrapes)This is a static access kill-switch.
-
-
-
Field Detail
-
AUTO_DOWNLOAD_SETTING
public static final java.lang.String AUTO_DOWNLOAD_SETTING
- See Also:
- Constant Field Values
-
DISABLE_CHECKSUMS_SETTING
public static final java.lang.String DISABLE_CHECKSUMS_SETTING
- See Also:
- Constant Field Values
-
SYSTEM_PROPERTIES_SETTING
public static final java.lang.String SYSTEM_PROPERTIES_SETTING
- See Also:
- Constant Field Values
-
instance
protected static GrapeEngine instance
-
-
Method Detail
-
getEnableGrapes
public static boolean getEnableGrapes()
This is a static access kill-switch. All of the static shortcut methods in this class will not work if this property is set to false. By default it is set to true.
-
setEnableGrapes
public static void setEnableGrapes(boolean enableGrapes)
This is a static access kill-switch. All of the static shortcut methods in this class will not work if this property is set to false. By default it is set to true.
-
getEnableAutoDownload
public static boolean getEnableAutoDownload()
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.
-
setEnableAutoDownload
public static void setEnableAutoDownload(boolean enableAutoDownload)
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.
-
getDisableChecksums
public static boolean getDisableChecksums()
Global flag to ignore checksums. By default it is set to false.
-
setDisableChecksums
public static void setDisableChecksums(boolean disableChecksums)
Set global flag to ignore checksums. By default it is set to false.
-
getInstance
public static GrapeEngine getInstance()
-
grab
public static void grab(java.lang.String endorsed)
-
grab
public static void grab(java.util.Map<java.lang.String,java.lang.Object> dependency)
-
grab
public static void grab(java.util.Map<java.lang.String,java.lang.Object> args, java.util.Map... dependencies)
-
enumerateGrapes
public static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<java.lang.String>>> enumerateGrapes()
-
resolve
public static java.net.URI[] resolve(java.util.Map<java.lang.String,java.lang.Object> args, java.util.Map... dependencies)
-
resolve
public static java.net.URI[] resolve(java.util.Map<java.lang.String,java.lang.Object> args, java.util.List depsInfo, java.util.Map... dependencies)
-
listDependencies
public static java.util.Map[] listDependencies(java.lang.ClassLoader cl)
-
addResolver
public static void addResolver(java.util.Map<java.lang.String,java.lang.Object> args)
-
-