Groovy Documentation

## groovy.lang
[Java] Annotation Type GrabResolver

    java.lang.Object
      groovy.lang.GrabResolver

    @Retention(RetentionPolicy.SOURCE)
    @Target({
            ElementType.CONSTRUCTOR,
            ElementType.FIELD,
            ElementType.LOCAL_VARIABLE,
            ElementType.METHOD,
            ElementType.PARAMETER,
            ElementType.TYPE})
    public @interface GrabResolver

Used to add a repository for resolving Grape dependencies.

For example:

     @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 {
       // ...
     }

By default, the Grapes subsystem uses an Ivy chained resolver. Each resolver added using `@GrabResolver` is 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.codehaus.org/Grape.

Authors:
  Merlyn Albery-Speyer

Required Element Summary
`java.lang.String` | `name`
`java.lang.String` | `root`

Optional Element Summary
`boolean` | `m2Compatible` @default true
`java.lang.String` | `value` @default ""

Method Summary

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Element Detail

### m2Compatible

    public boolean m2Compatible

  @default true

### name

    public java.lang.String name

### root

    public java.lang.String root

### value

    public java.lang.String value

  @default ""

Groovy Documentation