Allow custom dependency metadata to be used with the CLI

Add support for a new annotation, @GrabMetadata, that can be used
to provide the coordinates of one or more properties files, such as
the one published by Spring IO Platform, as a source of dependency
metadata. For example:

@GrabMetadata("com.example:metadata:1.0.0")

The referenced properties files must be in the format
group:module=version.

Limitations:

 - Only a single @GrabMetadata annotation is supported
 - The referenced properties file must be accessible in one of the
   default repositories, i.e. it cannot be accessed in a repository
   that's added using @GrabResolver

Closes #814
This commit is contained in:
Andy Wilkinson
2014-05-19 15:58:42 +01:00
parent 3f498a4803
commit d2fc80b818
19 changed files with 589 additions and 143 deletions

View File

@@ -0,0 +1,5 @@
@org.springframework.boot.groovy.GrabMetadata('test:test:1.0.0')
@Grab('ejb-api')
class CustomGrabMetadata {
}

View File

@@ -0,0 +1,5 @@
@GrabMetadata("foo:bar:1.0")
@GrabMetadata("alpha:bravo:2.0")
class DuplicateGrabMetadata {
}