Commit Graph

461 Commits

Author SHA1 Message Date
Phillip Webb af0d08c998 Polish 2013-10-08 21:17:39 -07:00
Phillip Webb b772f7c2e4 Polish
Minor formatting and consistent copyright header.
2013-10-08 20:30:45 -07:00
Phillip Webb efe102bd51 Polish CLI tester code
Reduce duplication by extracting FileOptions class to be shared by
both the RunCommand and the TestCommand.

Also applied minor code convention tweaks.
2013-10-08 20:22:59 -07:00
Dave Syer ef17ff8d24 Adapt device change to new springcli.properties 2013-10-08 17:50:55 -04:00
Roy Clarkson 5cdaa43912 Add Spring Mobile Device Resolver autoconfiguration 2013-10-08 17:43:09 -04:00
Dave Syer a72ab9eb7d Refactor cli properties into single project 2013-10-08 15:53:55 -04:00
Dave Syer b5f0f97110 Clean up TestCommand paraphenalia 2013-10-08 15:39:37 -04:00
Greg Turnquist 1ce13cc2c2 Add 'spring test [files]' command to compile and test code automatically
- Look for JUnit test symbols, and add JUnit automatically
- Look for Spock test symbols, and add Spock automatically
- Based on what test libraries were used, invoke relevant embedded testers
  and accumulate results
- Make it so that multiple testers can be invoked through a single 'test' command
- Print out total results and write out detailed trace errors in results.txt
- Update based on the new artifact resolution mechanism
2013-10-08 12:09:54 -05:00
Andy Wilkinson c1ec5e5c0e Support @Grab without a version or group
Usually, use of @Grab requires you to specify a group, module, and
version when identifying a dependency. This can be done in two
different ways:

@Grab(group='alpha', module='bravo', version='1.0.0')
@Grab('alpha:bravo:1.0.0')

This commit allows users to only specify a module: the group is
inferred and the version is the one dictated by the boot CLI. Both
forms are supported:

@Grab(module='bravo')
@Grab('bravo')

Groovy's global AST transformations, which is how Grab is implemented,
do not support ordering and we need to augment the AST for the Grab
annotation before its processed by the Grab AST transformation. To
work around this, reflection is used to get hold of the compile
operations in the conversion phase, and a new AST transformation is
inserted immediately before the first AST transformation operation.

To allow a module's groupId and version to be resolved consistently,
META-INF/springcli.properties has been enhanced to include properties
for each module that we want to support in the following form:

<module>.groudId = <groudId>
<module>.version = <version>

<groupId> and <version> are taken from the Maven project's
dependencies and VPP, a Velocity-based pre-processor, is used to
automatically generate the enhanced properties file.

To prevent pollution of spring-boot-cli's class path with the
dependencies that are only required to populate springcli.properties,
a separate project, spring-boot-cli-properties, has been created.
spring-boot-cli depends upon this now project causing it to, via the
shade plug, include the properties file in its jar.

Previously DependencyCustomizer allow a dependency to be added by
specifying its full coordinates, i.e. a group ID, artifact ID, and
version. This commit updates DependencyCustomizer to only require
an artifact/module ID. The group ID and version are then resolved
using the same mechanism as the enhanced @Grab support.

[#56328644] [bs-312] Allow @Grab without version
2013-10-08 10:41:35 +01:00
Greg Turnquist 941d163709 Add support for Spring Rabbit (via Spring AMQP) to Boot
- If RabbitTemplate is on the classpath, turn on autodetection.
- Create a RabbitTemplate, a Rabbit ConnectionFactory, and a RabbitAdmin is spring.rabbitmq.dynamic:true
- Enable some **spring.rabbitmq** properties like host, port, username, password, and dynamic
- Add tests to verify functionality
- Add Groovy CLI functionality. Base it on @EnableRabbitMessaging. Add spring-amqp to the path.
- Create rabbit.groovy test to prove it all works.
- Make Queue and TopicExchange top-level Spring beans in rabbit.groovy test script
2013-09-26 12:14:06 -04:00
Greg Turnquist fa6e6fde6c Add JMS autoconfig support
* application.properties support for spring.jms and spring.activemq

* more tests to verify ActiveMQConnectionFactory pooling

* Groovy support and simple sample with activemq

* Groovy detection mechanism is @EnableJmsMessaging annotation
2013-09-26 11:53:06 -04:00
Phillip Webb c544921eaa Polish whitespace 2013-09-24 15:42:45 -07:00
Phillip Webb fd9e258d12 Replace 'springsource.org' with 'spring.io'
Replace all references to 'springsource.org' with the new 'spring.io'
domain.
2013-09-23 14:44:59 -07:00
Christian Dupuis a1631d581b Add license and legal information on third party open source software that is part of the CLI distribution 2013-09-20 16:40:02 +01:00
Dave Syer 04ba4d064e Investigating failing tests 2013-09-20 15:38:49 +01:00
Phillip Webb 9a529b41c1 Polish 2013-09-18 12:50:47 -07:00
Greg Turnquist 5801e422cf [BS-48] Add autoconfigured JMS support
* Add ability to detect spring-jms on the path and create a JmsTemplate with
  ActiveMQConnectionFactory
* Create tests showing autoconfigured JmsTemplate with ActiveMQ, but prove it
  backs off if a separate ConnectionFactory exists.
* Add support to spring-boot-cli to that it detects JmsTemplate, DefaultMessageListenerContainer,
  or SimpleMessageListenerContainer, and turns on autoconfiguration as well as
  add proper @Grab's and import statements.
* Write a jms.groovy test showing proper CLI support

Simplify ActiveMQ configuration

Update ActiveMQ to 5.7.0
2013-09-18 17:52:14 +01:00
Dave Syer f76662a6ec Add spring-jdbc as well if necessary 2013-09-14 11:01:55 -07:00
Dave Syer 621ecd3901 Added JDBC and @Transactional support to Groovy CLI
* @EnableTransactionManagement triggers spring-tx imports
* Field or method of type JdbcTemplate or NamedParameterJdbcTemplate
  of DataSource triggers spring-jdbc imports
2013-09-13 08:02:56 -07:00
Dave Syer 8467a66e84 Add security.management.enabled flag 2013-09-06 19:54:15 +01:00
Phillip Webb a33425920b Rework POMs to support automated CI release 2013-09-05 22:05:29 -07:00
Phillip Webb a44f8bc59e Increase SampleIntegrationTests run timeouts
Increase the timeouts to give CI builds more time should dependencies
be missing.
2013-09-05 22:04:39 -07:00
Phillip Webb 347f30d135 Recognize @RestController as MVC Application
Update CLI SpringMvcCompilerAutoConfiguration to recognize Spring's new
@RestController annotation.
2013-09-05 17:15:14 -07:00
Phillip Webb 13f51b7901 Add version properties
Add version properties to dependencies POM so that users can easily
override. Also use consistent naming for all property keys.
2013-09-05 17:15:14 -07:00
Dave Syer 5fa0166dea Upgrade to Reactor 1.0.0.M2 2013-09-05 17:14:17 -07:00
Dave Syer 082678d660 Use echo+exit instead of die 2013-09-05 17:14:17 -07:00
Phillip Webb 1d4f86452f Use web-starter for CLI MVC compiler auto-config 2013-09-05 17:14:16 -07:00
Phillip Webb 47d0ba5c8e Remove superfluous ivy log output 2013-09-05 17:14:15 -07:00
Phillip Webb 0a9d7c6ef2 Use managed spring-integration-groovy-dsl
Update SpringIntegrationCompilerAutoConfiguration to use the managed
version of spring-integration-groovy-dsl.
2013-09-05 17:14:15 -07:00
Dave Syer 05e678acb3 Clean out grapes 2013-09-05 17:14:10 -07:00
Dave Syer d88e1b4b7a Add test case for ivy customization
A bug in ivy (tickled by maven leaving a pom
but no jar in the local repo) would make the
default Grapes ivy config fail (cannot grab...).
Phil's workaround now has a test case.
2013-09-05 17:14:09 -07:00
Phillip Webb 39aea5d944 Ensure localm2 ivy repo can resolve artifacts
Fix the localm2 repository to only consider that a pom exists when
its artifact is contained in the repository.

This prevents a download error that can occur when the local m2
repository contains a POM file but not a JAR.

Issue: #55532358
2013-09-05 17:14:09 -07:00
Dave Syer b720f7e688 Startup time for CLI app much quicker now
The Boot resolver didn't transfer enough of the settings
of the default ChainResolver. Adding a boolean flag was
enough to make the chatter die down for dependencies
that were unneeded.

[Fixes #55358344] [bs-291]
2013-09-05 17:14:08 -07:00
Dave Syer 0993f3da0a Restore Tomcat in CLI
Seems to work. I think the problem was the race conditions
that we hopefully already eliminated. I got an out of memory
error running the samples tests in Eclipse, but then it went
away again (something to look out for).

[Fixes #54925992] [bs-280]
2013-09-05 17:14:08 -07:00
Dave Syer 0d583deb27 Add CLASSPATH elements back to spring CLI script
Also add @WebConfiguration as a shortcut for groovy
scripts to get MVC behaviour (without a @Controller)

[#54926366]
2013-08-12 18:18:11 +01:00
Phillip Webb cf655945aa Polish 2013-08-09 12:28:54 -07:00
Phillip Webb f25b9e109f Remove trailing whitespace from bash script 2013-08-08 05:07:44 -07:00
Dave Syer 3b9df63f73 Add bash completion for spring command
* Added src/main/content/bash_completion.d/spring
* Also made all commands alias to "--<self>" so
"--help" is a synonym for "help" (for instance). This
helps with the completion generation.

[Fixes #54827292]
2013-08-08 11:00:41 +01:00
Phillip Webb f4c129a063 Don't use snapshot repos for CLI test
Update SampleIntegrationTests to only use local maven repo when
running integration tests.
2013-08-06 01:22:59 -07:00
Phillip Webb 40a9176937 Restructure distribution content
Include LICENCE and INSTALL text files and ensure that .bat file is
not set with executable Unix file permissions.
2013-08-05 22:31:28 -07:00
Phillip Webb 54cb7b39c9 Change assembly name to '-bin' and add tar.gz 2013-08-05 15:54:38 -07:00
Phillip Webb f08b283b08 Implement CLI --version command 2013-08-05 15:37:11 -07:00
Phillip Webb 02f0c2b639 Get the version to clean from the pom.xml 2013-08-05 15:33:57 -07:00
Phillip Webb aaebb3f3fb Improve Ivy resolution
Refactor GrapeEngineCustomizer to improve ivy resolution times by
failing early when resolution is known to fail.
2013-08-05 15:25:16 -07:00
Phillip Webb e5918b6756 Restore grapes cleaner 2013-08-05 14:53:19 -07:00
Phillip Webb 77455ec3dc Fix CLI test failures 2013-08-05 13:48:14 -07:00
Phillip Webb 4038b39496 Add OutputCapture test class 2013-08-05 13:48:14 -07:00
Phillip Webb 7d3ac266e8 Fix GrapesCleaner to work with renamed artifacts 2013-08-05 13:48:14 -07:00
Phillip Webb 6bb628adb4 Indicate downloading dependencies progress in CLI
Update CLI to show a "Downloading Dependencies..." message if the
initial dependency resolution takes more than 3 seconds. Whilst
downloading dots are appended to the message.

Issue: #54589094
2013-08-05 08:51:39 -07:00
Dave Syer 34500632d4 Accept SPRING_HOME if already set 2013-08-05 11:00:24 +01:00
Phillip Webb 8a4b4bd155 Add spring.bat start script for Windows 2013-08-04 14:20:26 -07:00
Phillip Webb 8a19e48e21 Polish and simplify spring bash script 2013-08-04 14:20:03 -07:00
Phillip Webb a9700c92f3 Fix a few problems with spring start script
Fixed a few issues with the spring start script, mainly around symlinks.
Test on OSX, Ubuntu and Windows (Cygwin) with and would symlinks.
2013-08-04 08:58:07 -07:00
Phillip Webb 94855bf4ec Correct directory permissions in dist zip 2013-08-04 07:21:22 -07:00
Dave Syer 55ed0bdf45 Fix problem locating spring home 2013-08-03 09:27:57 +01:00
Dave Syer 1c34fb5ed3 Fix mvn assembly 2013-07-31 21:53:32 +01:00
Phillip Webb 4c067a89fe Ops -> Actuator 2013-07-31 12:57:25 -07:00
Dave Syer ec3c5b5321 Add auto compile tweaks for reactor 2013-07-31 09:21:16 +01:00
Phillip Webb 3bb79db579 Renamed spring-boot-ups -> spring-boot-starter 2013-07-31 01:11:10 -07:00
Phillip Webb b665a2bb1d Renamed packages
Issue: #54095231
2013-07-26 14:11:04 -07:00
Dave Syer 2098e23fca Change package names zero->boot
* actuator -> boot-ops
* cli -> boot-cli
* launcher -> boot-load
* autoconfig -> boot-config
* bootstrap -> boot-strap
* starters -> boot-up

[#54095231] [bs-253] Refactor Zero->Boot
2013-07-26 14:13:41 +01:00