Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Type | Name and Description |
---|---|
boolean |
changing Defaults to false but set to true if the dependency artifacts may change without a corresponding
revision change. |
String |
classifier The classifier if in use, e.g.: "jdk14" @default "" |
String |
conf The configuration if in use (normally only used by internal ivy repositories). |
String |
ext The extension of the artifact (normally safe to leave at default value of "jar" but other values like "zip" are sometimes useful). |
boolean |
force Defaults to false but set to true to indicate to the underlying Ivy conflict manager that this
dependency should be forced to the given revision. |
String |
group The organisation or group, e.g.: "org.apache.ant". |
boolean |
initClass By default, when a @Grab annotation is used, a Grape.grab() call is added
to the static initializers of the class the annotatable node appears in.
|
String |
module The module or artifact, e.g.: "ant-junit". |
boolean |
transitive Defaults to true but set to false if you don't want transitive dependencies also to be downloaded.
|
String |
type The type of the artifact (normally safe to leave at default value of "jar" but other values like "sources" and "javadoc" are sometimes useful). |
String |
value Allows a more compact convenience form in one of two formats with optional appended attributes. |
String |
version The revision or version, e.g.: "1.7.1". |
Defaults to false
but set to true
if the dependency artifacts may change without a corresponding
revision change. Not normally recommended but may be useful for certain kinds of snapshot artifacts.
May reduce the amount of underlying Ivy caching. Proper behavior may be dependent on the resolver in use.
@default false
The classifier if in use, e.g.: "jdk14" @default ""
The configuration if in use (normally only used by internal ivy repositories).
One or more comma separated values with or without square brackets,
e.g. for hibernate you might have "default,proxool,oscache" or "[default,dbcp,swarmcache]".
This last hibernate example assumes you have set up such configurations in your local Ivy repo
and have changed your grape config (using grapeConfig.xml) or the @GrabConfig
annotation
to point to that repo.
@default ""
The extension of the artifact (normally safe to leave at default value of "jar" but other values like "zip" are sometimes useful). @default ""
Defaults to false
but set to true
to indicate to the underlying Ivy conflict manager that this
dependency should be forced to the given revision. Otherwise, depending on the conflict manager in play, a later
compatible version might be used instead.
@default false
The organisation or group, e.g.: "org.apache.ant". A non-empty value is required unless value() is used. @default ""
By default, when a @Grab
annotation is used, a Grape.grab()
call is added
to the static initializers of the class the annotatable node appears in.
If you wish to disable this, add initClass=false
to the annotation.
@default true
The module or artifact, e.g.: "ant-junit". A non-empty value is required unless value() is used. @default ""
Defaults to true
but set to false
if you don't want transitive dependencies also to be downloaded.
You may then need additional @Grab
statements for any required dependencies.
@default true
The type of the artifact (normally safe to leave at default value of "jar" but other values like "sources" and "javadoc" are sometimes useful). But see also the "classifier" attribute which is also sometimes used for "sources" and "javadoc". @default ""
Allows a more compact convenience form in one of two formats with optional appended attributes. Must not be used if group(), module() or version() are used.
You can choose either format but not mix-n-match:
group:module:version:classifier@ext
(where only group and module are required)
group#module;version[confs]
(where only group and module are required and confs,
if used, is one or more comma separated configuration names)
In addition, you can add any valid Ivy attributes at the end of your string value using
semi-colon separated name = value pairs, e.g.:
@Grab('junit:junit:*;transitive=false')
@Grab('group=junit;module=junit;version=4.8.2;classifier=javadoc')
@default ""
The revision or version, e.g.: "1.7.1". A non-empty value is required unless value() is used. @default ""