@AutoFinal
@CompileStatic
class GrapeMaven
extends Object
implements GrapeEngine
Implementation supporting @Grape and @Grab annotations based on Maven.
| Type | Name and description |
|---|---|
boolean |
enableGrapesEnables or disables grape resolution. |
Set<MavenGrabRecord> |
grabRecordsForCurrDependenciesStores the MavenGrabRecord(s) for all dependencies in each grab() call. |
Map<ClassLoader, Set<MavenGrabRecord>> |
loadedDepsDependencies loaded into each class loader. |
List<Closure> |
progressListenersProgress listeners notified during dependency resolution. |
List<RemoteRepository> |
reposConfigured remote repositories in lookup order. |
| Constructor and description |
|---|
GrapeMaven() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
addProgressListener(Closure listener)Adds a progress listener for resolution events. |
|
void |
addResolver(Map<String, Object> args)Adds a repository resolver to the front of the repository list. |
|
static MavenGrabRecord |
createGrabRecord(Map dep)Converts dependency coordinates into a Maven grab record. |
|
Map<String, Map<String, List<String>>> |
enumerateGrapes()Enumerates cached grapes by group, module, and version. |
|
URI[] |
getDependencies(Map args, List depsInfo, MavenGrabRecord[] grabRecords)Resolves the supplied grab records with Maven Resolver. |
|
static File |
getGrapeCacheDir()Returns the cache directory used for downloaded artifacts. |
|
static File |
getGrapeDir()Returns the root directory used by grape. |
|
static File |
getGroovyRoot()Returns the configured Groovy home directory for grape state. |
|
Object |
grab(String endorsedModule)Grab the endorsed module for the current Groovy version. |
|
Object |
grab(Map args)Grabs a dependency described by a single argument map. |
|
Object |
grab(Map args, Map[] dependencies)Grabs one or more dependencies and adds them to the target class loader. |
|
Map[] |
listDependencies(ClassLoader classLoader)Lists dependencies already loaded into the supplied class loader. |
|
void |
removeProgressListener(Closure listener)Removes a previously registered progress listener. |
|
URI[] |
resolve(Map args, Map[] dependencies)Resolves dependencies using the implicit target class loader. |
|
URI[] |
resolve(Map args, List depsInfo, Map[] dependencies)Resolves dependencies and optionally collects dependency metadata. |
|
URI[] |
resolve(ClassLoader loader, Map args, Map[] dependencies)Resolves dependencies for an explicit class loader. |
|
URI[] |
resolve(ClassLoader loader, Map args, List depsInfo, Map[] dependencies)Resolves dependencies for an explicit class loader and optional metadata sink. |
|
void |
setLoggingLevel(int level)Updates the logging level used by grape integrations. |
|
void |
uninstallArtifact(String group, String module, String rev)Removes a cached artifact version from the grape cache. |
Enables or disables grape resolution.
Stores the MavenGrabRecord(s) for all dependencies in each grab() call.
Dependencies loaded into each class loader.
Configured remote repositories in lookup order.
Adds a progress listener for resolution events.
listener - the listener to addAdds a repository resolver to the front of the repository list.
args - the resolver configurationConverts dependency coordinates into a Maven grab record.
dep - the dependency mapEnumerates cached grapes by group, module, and version.
Resolves the supplied grab records with Maven Resolver.
args - the resolution argumentsdepsInfo - the optional dependency metadata sinkgrabRecords - the dependencies to resolveReturns the cache directory used for downloaded artifacts.
Returns the root directory used by grape.
Returns the configured Groovy home directory for grape state.
Grab the endorsed module for the current Groovy version.
Grabs a dependency described by a single argument map.
args - the grab argumentsGrabs one or more dependencies and adds them to the target class loader.
args - the shared grab argumentsdependencies - the dependency descriptorsnull on success or the suppressed exceptionLists dependencies already loaded into the supplied class loader.
classLoader - the class loader to inspectRemoves a previously registered progress listener.
listener - the listener to removeResolves dependencies using the implicit target class loader.
args - the resolution argumentsdependencies - the dependencies to resolveResolves dependencies and optionally collects dependency metadata.
args - the resolution argumentsdepsInfo - the optional dependency metadata sinkdependencies - the dependencies to resolveResolves dependencies for an explicit class loader.
loader - the target class loaderargs - the resolution argumentsdependencies - the dependencies to resolveResolves dependencies for an explicit class loader and optional metadata sink.
loader - the target class loaderargs - the resolution argumentsdepsInfo - the optional dependency metadata sinkdependencies - the dependencies to resolveUpdates the logging level used by grape integrations.
level - the grape logging levelCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.