Package groovy.lang
Annotation Type GrabResolver
-
@Retention(SOURCE) @Target({CONSTRUCTOR,FIELD,LOCAL_VARIABLE,METHOD,PARAMETER,TYPE}) public @interface GrabResolver
Used to add a repository for resolving Grape dependencies.For example:
By default, the Grapes subsystem uses an Ivy chained resolver. Each resolver added using@GrabResolver(name='restlet.org', root='http://maven.restlet.org')@Grab(group='org.restlet', module='org.restlet', version='1.1.6') class MyRestlet extends org.restlet.Restlet { // ... }@GrabResolveris appended to the chain. By default, the grape subsystem is shared globally, so added resolvers will become available for any subsequent grab calls. Dependency resolution follows Ivy's artifact resolution which tries to resolve artifacts in the order specified in the chain of resolvers.Further information about customising grape behavior can be found on the Grape documentation page: http://groovy-lang.org/grape.html.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleaninitClassBy default, when a@GrabResolverannotation is used, aGrape.addResolver()call is added to the static initializers of the class the annotatable node appears in.booleanm2CompatibleDefaults to Maven2 compatibility.StringnameA meaningful name for a repo containing the grape/artifact.StringrootThe URL for a repo containing the grape/artifact.StringvalueAllows a shorthand form which sets the name and root to this value.
-
-
-
Element Detail
-
value
String value
Allows a shorthand form which sets the name and root to this value. Must not be used if name() or root() is non-empty.- Default:
- ""
-
-
-
name
String name
A meaningful name for a repo containing the grape/artifact. A non-empty value is required unless value() is used.- Default:
- ""
-
-
-
root
String root
The URL for a repo containing the grape/artifact. A non-empty value is required unless value() is used.- Default:
- ""
-
-