spring-boot/spring-boot-cli
Andy Wilkinson 376de01636 Don't remove @GrabResolver in JarCommand, disable initClass instead
Previously, JarCommand removed all @GrabResolver annotations in an
AST transformation. This was being performed as custom resolver
configuration is not necessary in a jar as all of the dependencies are
available from the jar. Furthermore, leaving the annotations in place
caused a failure when the jar was run due to a missing Ivy dependency
that's required by Groovy's default GrapeEngine, GrapeIvy.

The removal of @GrabResolver annotations was being done before they
could be used by Groovy's GrabAnnotationTransformation to configure
the GrapeEngine's resolvers. This resulted in the annotations having
no effect such that a dependency that was only available from a
repository made available by @GrabResolver would fail to resolve if
it was not cached locally.

This commit updates the AST transformation to leave the @GrabResolver
annotations in place but to set their initClass attribute to false.
This allows the annotation to be used while the jar's being compiled,
but supresses the generation of the static initializer that adds the
custom resolver to the GrapeEngine when the compiled code's run via
java -jar.

Fixes gh-2330
2015-01-14 16:42:43 +00:00
..
samples Fix JMS support in the CLI 2014-12-08 08:39:47 +01:00
src Don't remove @GrabResolver in JarCommand, disable initClass instead 2015-01-14 16:42:43 +00:00
test-samples Add spring-test annotations to auto imports 2014-05-28 14:05:13 +01:00
pom.xml Next development version 2014-12-10 18:06:30 -08:00