diff --git a/pom.xml b/pom.xml
index 5be17f66d8..1b6adf30c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,6 +37,7 @@
spring-boot-actuator
spring-boot-starters
spring-boot-cli
+ spring-boot-cli-properties
spring-boot-integration-tests
diff --git a/spring-boot-cli-properties/pom.xml b/spring-boot-cli-properties/pom.xml
new file mode 100644
index 0000000000..66578ea7bc
--- /dev/null
+++ b/spring-boot-cli-properties/pom.xml
@@ -0,0 +1,531 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-parent
+ 0.5.0.BUILD-SNAPSHOT
+ ../spring-boot-parent
+
+ spring-boot-cli-properties
+ jar
+
+ ${basedir}/..
+
+
+
+
+ ${project.groupId}
+ spring-boot-starter
+ ${project.version}
+ provided
+
+
+ ${project.groupId}
+ spring-boot-starter-actuator
+ ${project.version}
+ provided
+
+
+ ${project.groupId}
+ spring-boot-starter-aop
+ ${project.version}
+ provided
+
+
+ ${project.groupId}
+ spring-boot-starter-batch
+ ${project.version}
+ provided
+
+
+ ${project.groupId}
+ spring-boot-starter-data-jpa
+ ${project.version}
+ provided
+
+
+ ${project.groupId}
+ spring-boot-starter-integration
+ ${project.version}
+ provided
+
+
+ ${project.groupId}
+ spring-boot-starter-jdbc
+ ${project.version}
+ provided
+
+
+ ${project.groupId}
+ spring-boot-starter-jetty
+ ${project.version}
+ provided
+
+
+ ${project.groupId}
+ spring-boot-starter-logging
+ ${project.version}
+ provided
+
+
+ ${project.groupId}
+ spring-boot-starter-security
+ ${project.version}
+ provided
+
+
+ ${project.groupId}
+ spring-boot-starter-tomcat
+ ${project.version}
+ provided
+
+
+ ${project.groupId}
+ spring-boot-starter-web
+ ${project.version}
+ provided
+
+
+ ${project.groupId}
+ spring-boot-starter-websocket
+ ${project.version}
+ provided
+
+
+ ch.qos.logback
+ logback-classic
+ provided
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ provided
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ provided
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-joda
+ provided
+
+
+ commons-dbcp
+ commons-dbcp
+ provided
+
+
+ commons-httpclient
+ commons-httpclient
+ provided
+
+
+ javax.servlet
+ javax.servlet-api
+ provided
+
+
+ javax.servlet
+ jstl
+ provided
+
+
+ joda-time
+ joda-time
+ provided
+
+
+ junit
+ junit
+ provided
+
+
+ log4j
+ log4j
+ provided
+
+
+ nz.net.ultraq.thymeleaf
+ thymeleaf-layout-dialect
+ provided
+
+
+ org.apache.activemq
+ activemq-core
+ provided
+
+
+ org.apache.tomcat.embed
+ tomcat-embed-core
+ provided
+
+
+ org.apache.tomcat.embed
+ tomcat-embed-logging-juli
+ provided
+
+
+ org.apache.tomcat.embed
+ tomcat-embed-jasper
+ provided
+
+
+ org.apache.tomcat
+ tomcat-jdbc
+ provided
+
+
+ org.apache.tomcat
+ tomcat-jsp-api
+ provided
+
+
+ org.aspectj
+ aspectjrt
+ provided
+
+
+ org.aspectj
+ aspectjweaver
+ provided
+
+
+ org.codehaus.groovy
+ groovy-templates
+ provided
+
+
+ org.eclipse.jetty
+ jetty-webapp
+ provided
+
+
+ javax.servlet
+ org.eclipse.jetty.orbit
+
+
+
+
+ org.eclipse.jetty
+ jetty-util
+ provided
+
+
+ org.eclipse.jetty
+ jetty-jsp
+ provided
+
+
+ org.eclipse.jetty
+ jetty-annotations
+ provided
+
+
+ org.hamcrest
+ hamcrest-library
+ provided
+
+
+ com.h2database
+ h2
+ provided
+
+
+ org.hibernate
+ hibernate-entitymanager
+ provided
+
+
+ org.hibernate.javax.persistence
+ hibernate-jpa-2.0-api
+ provided
+
+
+ org.hibernate
+ hibernate-validator
+ provided
+
+
+ org.hsqldb
+ hsqldb
+ provided
+
+
+ org.liquibase
+ liquibase-core
+ provided
+
+
+ org.projectreactor
+ reactor-spring
+ provided
+
+
+ org.mockito
+ mockito-core
+ provided
+
+
+ org.slf4j
+ jcl-over-slf4j
+ provided
+
+
+ org.slf4j
+ slf4j-api
+ provided
+
+
+ org.slf4j
+ jul-to-slf4j
+ provided
+
+
+ org.slf4j
+ slf4j-log4j12
+ provided
+
+
+ org.slf4j
+ slf4j-jdk14
+ provided
+
+
+ org.springframework
+ spring-aop
+ provided
+
+
+ org.springframework
+ spring-beans
+ provided
+
+
+ org.springframework
+ spring-core
+ provided
+
+
+ org.springframework
+ spring-context
+ provided
+
+
+ org.springframework
+ spring-context-support
+ provided
+
+
+ quartz
+ quartz
+
+
+
+
+ org.springframework
+ spring-expression
+ provided
+
+
+ org.springframework
+ spring-jdbc
+ provided
+
+
+ org.springframework
+ spring-jms
+ provided
+
+
+ org.springframework
+ spring-messaging
+ provided
+
+
+ org.springframework
+ spring-orm
+ provided
+
+
+ org.springframework
+ spring-oxm
+ provided
+
+
+ commons-lang
+ commons-lang
+
+
+
+
+ org.springframework
+ spring-test
+ provided
+
+
+ org.springframework
+ spring-tx
+ provided
+
+
+ org.springframework
+ spring-websocket
+ provided
+
+
+ org.springframework
+ spring-web
+ provided
+
+
+ org.springframework
+ spring-webmvc
+ provided
+
+
+ commons-logging
+ commons-logging
+
+
+
+
+ org.springframework.batch
+ spring-batch-core
+ provided
+
+
+ org.springframework.data
+ spring-data-jpa
+ provided
+
+
+ org.springframework
+ spring-jdbc
+
+
+ org.springframework
+ spring-orm
+
+
+
+
+ org.springframework.data
+ spring-data-mongodb
+ provided
+
+
+ org.springframework.integration
+ spring-integration-core
+ provided
+
+
+ org.springframework.integration
+ spring-integration-file
+ provided
+
+
+ org.springframework.integration
+ spring-integration-http
+ provided
+
+
+ org.springframework.integration
+ spring-integration-ip
+ provided
+
+
+ org.springframework.integration
+ spring-integration-stream
+ provided
+
+
+ org.springframework.integration
+ spring-integration-dsl-groovy-core
+ provided
+
+
+ org.springframework.security
+ spring-security-core
+ provided
+
+
+ org.springframework.security
+ spring-security-config
+ provided
+
+
+ org.springframework.security
+ spring-security-web
+ provided
+
+
+ org.springframework.security
+ spring-security-acl
+ provided
+
+
+ org.thymeleaf
+ thymeleaf
+ provided
+
+
+ org.thymeleaf
+ thymeleaf-spring3
+ provided
+
+
+ org.thymeleaf.extras
+ thymeleaf-extras-springsecurity3
+ provided
+
+
+ org.yaml
+ snakeyaml
+ provided
+
+
+ org.apache.geronimo.specs
+ geronimo-jms_1.1_spec
+ provided
+
+
+
+
+
+ ${project.build.directory}/generated-resources
+
+
+
+
+ maven-jar-plugin
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+
+
+ generate-cli-properties
+ generate-sources
+
+
+
+
+
+
+
+
+
+ run
+
+
+
+
+
+
+
diff --git a/spring-boot-cli-properties/src/main/resources/META-INF/springcli.properties.vpp b/spring-boot-cli-properties/src/main/resources/META-INF/springcli.properties.vpp
new file mode 100644
index 0000000000..ff05b44b4e
--- /dev/null
+++ b/spring-boot-cli-properties/src/main/resources/META-INF/springcli.properties.vpp
@@ -0,0 +1,18 @@
+#set( $artifacts = $project.getReference('maven.project').artifacts )
+#foreach( $artifact in $artifacts )
+#if ( $artifact.scope == 'provided' )
+${artifact.artifactId}.version: $artifact.version
+${artifact.artifactId}.groupId: $artifact.groupId
+#end
+#end
+groovy.version: $ant.get('groovy.version')
+jetty.version: $ant.get('jetty.version')
+reactor.version: $ant.get('reactor.version')
+spring.version: $ant.get('spring.version')
+spring-batch.version: $ant.get('spring-batch.version')
+spring-boot.version: $ant.get('project.version')
+spring-rabbit.version: $ant.get('spring-rabbit.version')
+spring-security.version: $ant.get('spring-security.version')
+spring-integration.version: $ant.get('spring-integration.version')
+spring-integration-groovydsl.version: $ant.get('spring-integration-groovydsl.version')
+tomcat.version: $ant.get('tomcat.version')
\ No newline at end of file
diff --git a/spring-boot-cli/pom.xml b/spring-boot-cli/pom.xml
index 1a0f99dbbd..dd304597b6 100644
--- a/spring-boot-cli/pom.xml
+++ b/spring-boot-cli/pom.xml
@@ -16,6 +16,11 @@
+
+ ${project.groupId}
+ spring-boot-cli-properties
+ ${project.version}
+
net.sf.jopt-simple
jopt-simple
@@ -62,12 +67,6 @@
-
-
- src/main/resources
- true
-
-
maven-surefire-plugin
diff --git a/spring-boot-cli/samples/simpleGrab.groovy b/spring-boot-cli/samples/simpleGrab.groovy
new file mode 100644
index 0000000000..3528a0d30d
--- /dev/null
+++ b/spring-boot-cli/samples/simpleGrab.groovy
@@ -0,0 +1,24 @@
+package org.test
+
+@Grab('spring-boot-starter-web')
+@Component
+class Example implements CommandLineRunner {
+
+ @Autowired
+ private MyService myService
+
+ void run(String... args) {
+ print "Hello " + this.myService.sayWorld()
+ }
+}
+
+
+@Service
+class MyService {
+
+ String sayWorld() {
+ return "World!"
+ }
+}
+
+
diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/ArtifactCoordinatesResolver.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/ArtifactCoordinatesResolver.java
new file mode 100644
index 0000000000..4a93150306
--- /dev/null
+++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/ArtifactCoordinatesResolver.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2012-2013 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.boot.cli.compiler;
+
+/**
+ * A resolver for artifacts' Maven coordinates, allowing a group id or version to be
+ * obtained from an artifact ID.
+ *
+ * @author Andy Wilkinson
+ */
+public interface ArtifactCoordinatesResolver {
+
+ /**
+ * Gets the group id of the artifact identified by the given {@code artifactId}.
+ * Returns {@code null} if the artifact is unknown to the resolver.
+ *
+ * @param artifactId The id of the artifact
+ *
+ * @return The group id of the artifact
+ */
+ String getGroupId(String artifactId);
+
+ /**
+ * Gets the version of the artifact identified by the given {@code artifactId}.
+ * Returns {@code null} if the artifact is unknown to the resolver.
+ *
+ * @param artifactId The id of the artifact
+ *
+ * @return The version of the artifact
+ */
+ String getVersion(String artifactId);
+}
diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java
index 668d032e84..278a891156 100644
--- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java
+++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/DependencyCustomizer.java
@@ -20,14 +20,11 @@ import groovy.grape.Grape;
import groovy.lang.Grapes;
import groovy.lang.GroovyClassLoader;
-import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
/**
* Customizer that allows dependencies to be added during compilation. Delegates to Groovy
@@ -43,15 +40,17 @@ public class DependencyCustomizer {
private final List
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 1.7
+
+
+ org.apache.ant
+ ant
+ 1.7.0
+
+
+ foundrylogic.vpp
+ vpp
+ 2.2.1
+
+
+
org.codehaus.mojo
sonar-maven-plugin
@@ -311,6 +328,14 @@
true
+
+ objectstyle
+ ObjectStyle.org Repository
+ http://objectstyle.org/maven2/
+
+ false
+
+