Commit Graph

273 Commits (1.1.x)

Author SHA1 Message Date
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
10 years ago
Phillip Webb d3ccdc6319 Polish 10 years ago
Stephane Nicoll 9b598b49c2 Fix JMS support in the CLI
Partly back port changes from affb202e and 85c95744f to fix the usage
of JMS in the CLI. Restore the integration test using HornetQ and fix the
coordinates of the JMS API.

Fixes gh-2075
10 years ago
Dave Syer 378f6b78ce Add ServiceLoader for AST transformations
The loading is via a marker interface SpringBootAstTransformation
to avoid clashing with other services registered as org.groovy.*

Fixes gh-1392
10 years ago
Andy Wilkinson 896a85b575 Add settings.xml used by AetherGrapeEngineTests 10 years ago
Andy Wilkinson 5f9fddd44a Explicitly apply mirror and auth settings to remote repos in the CLI
Previously, the CLI relied on Aether using the session's mirror
selector and authentication selector to customize the configured
repositories. These selectors are only used to configure what Aether
calls recessive repositories (repositories discovered when resolving
an artifact), rather than the explicitly configured repositories that
are typically used.

This commit updates AetherGrapeEngine to apply mirror and
authentication configuration to every added repository, bringing its
behaviour for these two settings into line with what it already does
for proxy configuration.

Fixes #1354
10 years ago
Phillip Webb 92899474ac Polish 10 years ago
Dave Syer 0c6a0bde5f Export SPRING_HOME for commands to consume if needed 10 years ago
Dave Syer 6ba8269db8 Add public getter for dependency context 10 years ago
Dave Syer 59b8fc63d9 Scan for a valid MANIFEST.MF instead of taking the first one
Fixes gh-1321
10 years ago
Andy Wilkinson f5c8a8879a Isolate CLI integration tests from any settings decryption failures 10 years ago
Andy Wilkinson 4d4cc076c6 Don't fail hard when settings.xml can't be decrypted by the CLI 10 years ago
Phillip Webb fa88c481a5 Remote trailing whitespace 11 years ago
Dave Syer 54a23f9920 Make -q and -v do something more sensible
-q switches off all logging and the banner, -v switches logging to debug,
running with neither will be info.

Fixes gh-1108
11 years ago
Dave Syer fd757cb371 Add logging.level to application.properties
E.g.

logging.level.org.springframework: DEBUG
logging.level.org.hibernate: WARN

Fixed gh-788
11 years ago
Dave Syer 179ac6022a Remove @GrabResolvers before packaging jar in CLI
Since all dependencies are local in a jar there is no need for
a GrabResolver (and it breaks the app because the default ivy
GrapeEngine is used instead of the smart, pretty Boot one).

Fixes gh-1179
11 years ago
Phillip Webb 9632abf825 Formatting and cleanup 11 years ago
Phillip Webb 1f36d4657f Fix various Windows related issues
Fixes gh-1168
11 years ago
Phillip Webb f30b962ff9 Add support for unpacking nested JARs
Update the executable JAR code to automatically unpack any entries
which include an entry comment starting `UNPACK:` to the temp folder.
The existing Maven and Gradle plugins have been updated with new
configuration options and the `spring-boot-tools` project has been
updated to write the appropriate entry comment based on a flag passed
in via the `Library` class.

This support has been added to allow libraries such a JRuby (which
assumes that `jruby-complete.jar` is always accessible as file) to work
with Spring Boot executable jars.

Fixes gh-1070
11 years ago
Phillip Webb a374929c90 Polish 11 years ago
Dave Syer 2c691e5ae5 Enhance JarCommand to support lists of includes and excludes
The lists are comma separated. In addition, user can add prefixes
"+" or "-", to signal that those values should be removed from the
default list, not added to a fresh one. E.g.

$ spring jar app.jar --include lib/*.jar,-static/** --exclude -**/*.jar

to include a jar file specifically, and make sure it is not excluded,
and additionally not include the static/** resources that would otherwise
be included in the defaults. As soon as "+" or "-" prefixes are detected
the default entries are all added (except the ones exlcuded with "-").

Fixes gh-1090
11 years ago
Phillip Webb 9b982dabdb Restore dependency-tools API compatibility
Refactor dependency-tools to restore API compatibility with Spring
Boot 1.0. This should reduce reflection hacks that tools such as Gretty
would otherwise have to make.

See gh-1035
11 years ago
Phillip Webb e891aa3525 Polish 11 years ago
Dave Syer 32dff415c3 Rationalize the Reactor autoconfig
It didn't make sense not to do anything at all if a Reactor @Bean
was detected, so now we only back off creating the rootReactor if
one is present.
11 years ago
Andy Wilkinson 156dadaebe Initialize DependencyResolutionContext with default dependency mgmt
In the absence of a @GrabMetadata annotation,
DependencyResolutionContext provided no dependency management. This
was leading to incorrect dependency versions being pulled in. This
commit intializes the context with default dependency management that
will be replaced should @GrabMetadata be encountered.

Fixes #1021
11 years ago
Dave Syer efcbb32788 Remove some compiler warnings 11 years ago
Phillip Webb f95cb602cc Fix CLI command/option package tangle
Fix package tangle in CLI my extracting ExitStatus to a status package.

See gh-1004
11 years ago
Phillip Webb 5da23e9968 Fix grape -> compiler package tangle
Fix package tangle by moving DependencyResolutionContext from the
compiler package to grape.

See gh-1004
11 years ago
Andy Wilkinson 212c30f6c7 Enhance DependencyCustomer: allow type and classifier to be specified
Closes #1002
11 years ago
Andy Wilkinson 059d504fd7 Fix DependencyCustomizerTests following merge of 1.0.x 11 years ago
Andy Wilkinson 0d7da4375f Merge branch '1.0.x' 11 years ago
Andy Wilkinson abc1e5de8f Fix ifAnyMissingClasses to return false if no classes are missing
Fixes #1003
11 years ago
Phillip Webb 97acd20d62 Polish 11 years ago
Andy Wilkinson 2fec9c4790 Merge branch '1.0.x' 11 years ago
Andy Wilkinson 8f7c96e8f0 Honour ext and classifier on @Grabbed dependencies
We currently honour type, but ignore ext. Aether doesn't make a
distinction between the two so a Grab that specifies both type and ext
but with different values is considered to be an error.

Fixes #995
11 years ago
Dave Syer ed15f742fd Fix bug in GroovyTemplate convenience
It was ignoring the engine argument in the 3 arg version
of template().
11 years ago
Dave Syer 2f653f0616 Add support for Spring HTTP in CLI tests 11 years ago
Dave Syer ed0cfea6d2 Add SmartImportCustomizer
Only imports classes with names that are not already
imported into teh SourceUnit

Fixes gh-983
11 years ago
Phillip Webb 11a093bdc0 Polish 11 years ago
Dave Syer 48c1228253 Add support for groovy utilities in "spring jar"
Also an integration test that uses the (new)
@EnableGroovyTemplates to switch on the template conveniences
in a non-webapp

Fixes gh-990
11 years ago
Dave Syer 3c6dfb72c5 Add ExitStatus to Command.run()
The main difference for now is the removal of the --nohup
(slightly hacky) option in TestCommand. Now a TestCommand
can signal to its caller that it wants to be hung up.

Fixes gh-975
11 years ago
Dave Syer 6fbafc3ca4 Add RUNTME scope to transitive dependencies in CLI
Fixes gh-977
11 years ago
Dave Syer e7aa192d82 Add ConfigurationProperties to autoconfigs 11 years ago
Dave Syer 8436627598 Allow tests to System.exit() by default
Otherwise the ApplicationContext stays alive and if it's a
server app the JVM does not exit at the end of "spring test".
User can override with "spring test foo.groovy --nohup"
(which we have to do in our unit tests).
11 years ago
Phillip Webb 7fd26a556d Fix social property binding
Update Spring Social auto-configurations to read properties using
the `dashed` notation and with the appropriate prefixes. This allows
properties to be specified in any of the relaxed forms.

Also minor refactor to extract common logic to a new
SocialAutoConfigurerAdapter base class.

See gh-941
11 years ago
Phillip Webb 5df52d3e94 Polish 11 years ago
Dave Syer 05d1a104e4 Add spring-test annotations to auto imports 11 years ago
Andy Wilkinson 47e3a72390 Source code formatting 11 years ago
Craig Walls 5e1913576e Document Spring Social support 11 years ago
Craig Walls f006b1231c Add Spring Social autoconfiguration 11 years ago