413 Commits

Author SHA1 Message Date
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.
2014-06-05 12:52:23 +01:00
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
2014-06-03 16:26:30 +01:00
Dave Syer
efcbb32788 Remove some compiler warnings 2014-06-02 10:56:12 +01:00
Phillip Webb
f95cb602cc Fix CLI command/option package tangle
Fix package tangle in CLI my extracting ExitStatus to a status package.

See gh-1004
2014-06-01 18:59:09 +01:00
Phillip Webb
5da23e9968 Fix grape -> compiler package tangle
Fix package tangle by moving DependencyResolutionContext from the
compiler package to grape.

See gh-1004
2014-06-01 18:49:13 +01:00
Andy Wilkinson
212c30f6c7 Enhance DependencyCustomer: allow type and classifier to be specified
Closes #1002
2014-05-30 23:27:07 +01:00
Andy Wilkinson
059d504fd7 Fix DependencyCustomizerTests following merge of 1.0.x 2014-05-30 23:27:06 +01:00
Andy Wilkinson
0d7da4375f Merge branch '1.0.x' 2014-05-30 23:26:59 +01:00
Andy Wilkinson
abc1e5de8f Fix ifAnyMissingClasses to return false if no classes are missing
Fixes #1003
2014-05-30 17:28:03 +01:00
Phillip Webb
97acd20d62 Polish 2014-05-30 16:47:30 +01:00
Andy Wilkinson
2fec9c4790 Merge branch '1.0.x' 2014-05-30 15:33:47 +01:00
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
2014-05-30 15:12:09 +01:00
Phillip Webb
3541495041 Drop unused objectstyle.org maven repo
Looks like a hang over from some older code.
2014-05-30 13:24:57 +01:00
Dave Syer
ed15f742fd Fix bug in GroovyTemplate convenience
It was ignoring the engine argument in the 3 arg version
of template().
2014-05-30 11:32:02 +01:00
Dave Syer
2f653f0616 Add support for Spring HTTP in CLI tests 2014-05-30 10:18:11 +01:00
Dave Syer
ed0cfea6d2 Add SmartImportCustomizer
Only imports classes with names that are not already
imported into teh SourceUnit

Fixes gh-983
2014-05-30 06:44:38 +01:00
Phillip Webb
11a093bdc0 Polish 2014-05-30 00:31:11 +01:00
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
2014-05-29 18:21:27 +01:00
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
2014-05-29 13:58:12 +01:00
Dave Syer
5e3cc95ccf Adjust security.basic.enabled=false behaviour
Actually the web-secure sample is misusing
security.basic.enabled=false (IMO) - it should be a flag
to say that you want to temporarily disable the basic security
fallback on application endpoins, not  way to disable all
security autoconfiguration.

Added test case to web-secure sample to ensure a user
can log in.

Fixes gh-979
2014-05-29 13:25:01 +01:00
Phillip Webb
bdcb9407eb Restore commons-logging dependency for spring-boot
Restore the dependency on commons-logging (transitively via spring-core)
for spring-boot. This means that we are not tied directly to SLF4J, but
it is still an option that can be used via `jcl-over-slf4j`.

The `spring-boot-starter-parent` continues to replace `commons-logging`
with `jcl-over-slf4j`.

Fixes gh-981
2014-05-28 23:03:26 +01:00
Phillip Webb
5a5a7be477 Polish 2014-05-28 22:05:23 +01:00
Andy Wilkinson
7a8be3d600 Use Spring Framework bom and fully exclude commons-logging
Closes #955
Closes #978
2014-05-28 20:12:29 +01:00
Dave Syer
6fbafc3ca4 Add RUNTME scope to transitive dependencies in CLI
Fixes gh-977
2014-05-28 18:18:15 +01:00
Dave Syer
e7aa192d82 Add ConfigurationProperties to autoconfigs 2014-05-28 17:36:55 +01:00
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).
2014-05-28 17:36:55 +01:00
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
2014-05-28 17:36:07 +01:00
Phillip Webb
5df52d3e94 Polish 2014-05-28 17:36:07 +01:00
Dave Syer
05d1a104e4 Add spring-test annotations to auto imports 2014-05-28 14:05:13 +01:00
Andy Wilkinson
47e3a72390 Source code formatting 2014-05-28 13:38:03 +01:00
Craig Walls
5e1913576e Document Spring Social support 2014-05-28 13:30:41 +01:00
Craig Walls
f006b1231c Add Spring Social autoconfiguration 2014-05-28 13:30:41 +01:00
Dave Syer
064998697d Ensure CLI adds @EnableAutoConfiguration in an appropriate place
Up to now we have been treating the *first* class to be compiled
as the "main" application and adding @EnableAutoConfiguration. This
isn't always appropriate (e.g. if it's a test case), so now we
look for an appropriate annotation before falling back to the old
behaviour.

In addition ensures classes with a field of type Reactor trigger
the reactor auto imports.

See gh-969
2014-05-28 13:00:31 +01:00
Dave Syer
3d9da64382 Add auto imports for integration testing
JUnit tests can now be @SpringApplicationConfiguration
and @IntegrationTest without any explicit imports. Also
makes @RunWith(SpringJUnit4ClassRunner) optional.

Fixes gh-969
2014-05-28 10:58:56 +01:00
Dave Syer
f1f36cd002 Extract closure grabber into AstUtils 2014-05-25 18:58:25 +01:00
Dave Syer
b71f07932e Support for explicit module path in dependency
Instead of *always* needing to pull auto-import dependencies
from the master parent pom, we now allow normal @Grab-style
module specifications, e.g. "io.ratpack:ratpack-groovy:0.9.2"
2014-05-25 18:58:07 +01:00
Phillip Webb
1a475102de Polish 2014-05-22 20:33:08 +01:00
Dave Syer
1e6a4f3f65 Remove duplicate JreProxySelector
Since we upgraded Aether we now have the native JreProxySelector
available so we don't need to keep a copy ourselves.
2014-05-22 18:03:52 +01:00
Dave Syer
0e2f9e74db Ensure a JreProxySelector is applied as a fallback
The issue was that the JreProxySelector was only applied
if the existing selector was null, but that hasn't been the case
since we added supporty for settings.xml. The strategy now is to
fallback to a JreProxySelector if the existing one is null
or not already a composite. Fixes gh-914.
2014-05-22 17:38:24 +01:00
Andy Wilkinson
1deeccda30 Revert "Work around Groovy compiler bug that can name classes incorrectly"
This reverts commit 46fc5c05e32b757c0d95eb13d4a592aa06593af3.

Closes #598
2014-05-21 13:58:44 +01:00
Phillip Webb
8bcda1bcbe Polish 2014-05-20 18:26:56 +01:00
Dave Syer
334c8142c4 Enhance Groovy template support in CLI
to allow user to specify the TemplateEngine

Fixes gh-908
2014-05-20 12:36:32 +01:00
Andy Wilkinson
d2fc80b818 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
2014-05-19 17:47:31 +01:00
Phillip Webb
506c0f50b9 Allow meta-data driven version overrides in Gradle
Add a `versionManagement` gradle configuration which can be used to
provide alternative version meta-data. Primarily added so that the
Spring IO platform can provide version overrides without causing a
cyclic build dependency.

Fixes gh-750
2014-05-08 14:37:42 +01:00
Dave Syer
894482df1a Initialize logback is it is present in CLI
This (empirically) fixes gh-726 using a new utility
(LogbackInitializer) in the loader tools. If anyone has enough
Gradle fu to understand where to put it (after the classpath is established
but before compilation) we could do the same thing in the Gradle plugin
(and that would fix gh-724).
2014-05-07 07:21:48 -07:00
Stephane Nicoll
33082fd56d Harmonized maven dependency management
This commit harmonizes the dependency management of internal modules
so that versions can be omitted everywhere. Update the maven coordinates
to provide the full groupId for consistency
2014-05-05 14:29:01 +01:00
Phillip Webb
34b7bb20fd Add maven implicit plugin group ID
Add previously implicit <groupId>org.apache.maven.plugins</groupId>
to plugin declarations.
2014-05-02 23:03:31 +01:00
Dave Syer
1b7d8d9ade Add SignalUtils to handle OS interrupts
Extract into a utility to be shared between Shell and RunMojo

Fixes gh-773
2014-05-02 20:17:22 +01:00
Gary Russell
9fc9523ce3 CLI Integration Sample Shutdown
Fixes gh-761

Also add some sugar to the println so that it stands
out a little against the logging.
2014-05-02 11:17:19 +01:00
Dave Syer
b12631d75d Ensure Spring Integration 4.0 is used in CLI
There was an issue with the generated poms for the dependency
tools (I'm not sure the generation step works if you don't
do "mvn clean"). Anyway I verified that it works and removed
the (now) unnecessary provided dependency from spring-boot-cli.

Fixes gh-362
2014-05-01 12:57:12 +01:00