From b761fa8ede7b962b94e1aa9b38f3c05ae92573bc Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Wed, 12 Jun 2013 04:37:14 +0100 Subject: [PATCH] Add tomcat starter and tweak spring CLI --- spring-bootstrap-cli/src/main/scripts/spring | 23 ++++------- .../start.groovy | 5 ++- spring-bootstrap-starters/pom.xml | 6 +++ .../spring-bootstrap-tomcat-starter/pom.xml | 39 +++++++++++++++++++ 4 files changed, 56 insertions(+), 17 deletions(-) create mode 100644 spring-bootstrap-starters/spring-bootstrap-tomcat-starter/pom.xml diff --git a/spring-bootstrap-cli/src/main/scripts/spring b/spring-bootstrap-cli/src/main/scripts/spring index 0a2f0faa32d..d657a9eff43 100755 --- a/spring-bootstrap-cli/src/main/scripts/spring +++ b/spring-bootstrap-cli/src/main/scripts/spring @@ -62,22 +62,15 @@ TARGETDIR=target/classes if [ -f build.gradle ]; then TARGETDIR=build/classes/main fi -if [ -f ${TARGETDIR} ]; then - if [ "${CLASSPATH}" == "" ]; then - CLASSPATH="${TARGETDIR}" - else - CLASSPATH="${CLASSPATH}":"${TARGETDIR}" + +for f in "${TARGETDIR}" "${SPRING_HOME}"/classes "${SPRING_BIN}" "${SPRING_HOME}"/*.jar "${SPRING_HOME}"/lib/*.jar; do + if [ -f $f -o -d $f ]; then + if [ "${CLASSPATH}" == "" ]; then + CLASSPATH="${f}" + else + CLASSPATH="${CLASSPATH}":"${f}" + fi fi -fi - -if [ "${CLASSPATH}" == "" ]; then - CLASSPATH="${SPRING_BIN}" -else - CLASSPATH="${CLASSPATH}":"${SPRING_BIN}" -fi - -for f in "${SPRING_HOME}"/classes "${SPRING_HOME}"/*.jar "${SPRING_HOME}"/lib/*.jar; do - [ -f $f ] && CLASSPATH="${CLASSPATH}":$f done if $cygwin; then diff --git a/spring-bootstrap-samples/spring-bootstrap-actuator-sample/start.groovy b/spring-bootstrap-samples/spring-bootstrap-actuator-sample/start.groovy index 77d6d26b368..6cecd252d27 100644 --- a/spring-bootstrap-samples/spring-bootstrap-actuator-sample/start.groovy +++ b/spring-bootstrap-samples/spring-bootstrap-actuator-sample/start.groovy @@ -1,4 +1,5 @@ -@Grab("org.springframework.bootstrap:spring-bootstrap-service:0.0.1-SNAPSHOT") -@Grab("org.springframework.bootstrap:spring-bootstrap-web-application:0.0.1-SNAPSHOT") +@Grab("org.springframework.bootstrap:spring-bootstrap-actuator:0.5.0.BUILD-SNAPSHOT") +@Grab("org.springframework.bootstrap:spring-bootstrap-web-starter:0.5.0.BUILD-SNAPSHOT") +@ComponentScan("org.springframework.bootstrap.sample.service") class Start { } diff --git a/spring-bootstrap-starters/pom.xml b/spring-bootstrap-starters/pom.xml index 4cc44d95053..93d72070ca3 100644 --- a/spring-bootstrap-starters/pom.xml +++ b/spring-bootstrap-starters/pom.xml @@ -20,6 +20,7 @@ spring-bootstrap-batch-starter spring-bootstrap-integration-starter spring-bootstrap-jpa-starter + spring-bootstrap-tomcat-starter spring-bootstrap-web-starter @@ -49,6 +50,11 @@ spring-bootstrap-web-starter ${spring.bootstrap.version} + + org.springframework.bootstrap + spring-bootstrap-tomcat-starter + ${spring.bootstrap.version} + org.springframework.bootstrap spring-bootstrap-jpa-starter diff --git a/spring-bootstrap-starters/spring-bootstrap-tomcat-starter/pom.xml b/spring-bootstrap-starters/spring-bootstrap-tomcat-starter/pom.xml new file mode 100644 index 00000000000..25550156b8f --- /dev/null +++ b/spring-bootstrap-starters/spring-bootstrap-tomcat-starter/pom.xml @@ -0,0 +1,39 @@ + + + 4.0.0 + + org.springframework.bootstrap + spring-bootstrap-starters + 0.5.0.BUILD-SNAPSHOT + + spring-bootstrap-tomcat-starter + + + org.springframework.bootstrap + spring-bootstrap-starter + + + org.apache.tomcat.embed + tomcat-embed-core + + + org.apache.tomcat.embed + tomcat-embed-logging-juli + + + org.springframework + spring-webmvc + + + commons-logging + commons-logging + + + + + javax.servlet + javax.servlet-api + + +