Jonathan LALOU 7 anni fa
parent
commit
3ac2a5bcf3

+ 0
- 2
CONTRIBUTING.adoc Vedi File

@@ -1,2 +0,0 @@
1
-If you have not previously done so, please fill out and
2
-submit the https://cla.pivotal.io/sign/spring[Contributor License Agreement].

+ 0
- 16
LICENSE.code.txt Vedi File

@@ -1,16 +0,0 @@
1
-   All code in this repository is:
2
-   =======================================================================
3
-   Copyright (c) 2013 GoPivotal, Inc. All Rights Reserved
4
-
5
-   Licensed under the Apache License, Version 2.0 (the "License");
6
-   you may not use this file except in compliance with the License.
7
-   You may obtain a copy of the License at
8
-
9
-       http://www.apache.org/licenses/LICENSE-2.0
10
-
11
-   Unless required by applicable law or agreed to in writing, software
12
-   distributed under the License is distributed on an "AS IS" BASIS,
13
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
-   See the License for the specific language governing permissions and
15
-   limitations under the License.
16
-

+ 0
- 1
LICENSE.writing.txt Vedi File

@@ -1 +0,0 @@
1
-Except where otherwise noted, this work is licensed under http://creativecommons.org/licenses/by-nd/3.0/

+ 0
- 166
README.adoc Vedi File

@@ -1,166 +0,0 @@
1
----
2
-tags: [rest]
3
-projects: [spring-framework]
4
-experimental: Try the code inside your browser with -> http://beta.codenvy.com/f?id=9fq0busbm3tz7i8c
5
----
6
-:spring_version: current
7
-:toc:
8
-:project_id: gs-rest-service
9
-:spring_version: current
10
-:spring_boot_version: 1.5.3.RELEASE
11
-:icons: font
12
-:source-highlighter: prettify
13
-
14
-This guide walks you through the process of creating a "hello world" link:/understanding/REST[RESTful web service] with Spring.
15
-
16
-== What you'll build
17
-
18
-You'll build a service that will accept HTTP GET requests at:
19
-
20
-----
21
-http://localhost:8080/greeting
22
-----
23
-
24
-and respond with a link:/understanding/JSON[JSON] representation of a greeting:
25
-
26
-[source,json]
27
-----
28
-{"id":1,"content":"Hello, World!"}
29
-----
30
-
31
-You can customize the greeting with an optional `name` parameter in the query string:
32
-
33
-----
34
-http://localhost:8080/greeting?name=User
35
-----
36
-
37
-The `name` parameter value overrides the default value of "World" and is reflected in the response:
38
-
39
-[source,json]
40
-----
41
-{"id":1,"content":"Hello, User!"}
42
-----
43
-
44
-
45
-== What you'll need
46
-
47
-:java_version: 1.8
48
-include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/prereq_editor_jdk_buildtools.adoc[]
49
-
50
-include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/how_to_complete_this_guide.adoc[]
51
-
52
-
53
-include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/hide-show-gradle.adoc[]
54
-
55
-include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/hide-show-maven.adoc[]
56
-
57
-include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/hide-show-sts.adoc[]
58
-
59
-
60
-
61
-[[initial]]
62
-== Create a resource representation class
63
-
64
-Now that you've set up the project and build system, you can create your web service.
65
-
66
-Begin the process by thinking about service interactions.
67
-
68
-The service will handle `GET` requests for `/greeting`, optionally with a `name` parameter in the query string. The `GET` request should return a `200 OK` response with JSON in the body that represents a greeting. It should look something like this:
69
-
70
-[source,json]
71
-----
72
-{
73
-    "id": 1,
74
-    "content": "Hello, World!"
75
-}
76
-----
77
-
78
-The `id` field is a unique identifier for the greeting, and `content` is the textual representation of the greeting.
79
-
80
-To model the greeting representation, you create a resource representation class. Provide a plain old java object with fields, constructors, and accessors for the `id` and `content` data:
81
-
82
-`src/main/java/hello/Greeting.java`
83
-[source,java]
84
-----
85
-include::complete/src/main/java/hello/Greeting.java[]
86
-----
87
-
88
-NOTE: As you see in steps below, Spring uses the http://wiki.fasterxml.com/JacksonHome[Jackson JSON] library to automatically marshal instances of type `Greeting` into JSON.
89
-
90
-Next you create the resource controller that will serve these greetings.
91
-
92
-
93
-== Create a resource controller
94
-
95
-In Spring's approach to building RESTful web services, HTTP requests are handled by a controller. These components are easily identified by the http://docs.spring.io/spring/docs/{spring_version}/javadoc-api/org/springframework/web/bind/annotation/RestController.html[`@RestController`] annotation, and the `GreetingController` below handles `GET` requests for `/greeting` by returning a new instance of the `Greeting` class:
96
-
97
-`src/main/java/hello/GreetingController.java`
98
-[source,java]
99
-----
100
-include::complete/src/main/java/hello/GreetingController.java[]
101
-----
102
-
103
-This controller is concise and simple, but there's plenty going on under the hood. Let's break it down step by step.
104
-
105
-The `@RequestMapping` annotation ensures that HTTP requests to `/greeting` are mapped to the `greeting()` method.
106
-
107
-NOTE: The above example does not specify `GET` vs. `PUT`, `POST`, and so forth, because `@RequestMapping` maps all HTTP operations by default. Use `@RequestMapping(method=GET)` to narrow this mapping.
108
-
109
-`@RequestParam` binds the value of the query string parameter `name` into the `name` parameter of the `greeting()` method. This query string parameter is explicitly marked as optional (`required=true` by default): if it is absent in the request, the `defaultValue` of "World" is used.
110
-
111
-The implementation of the method body creates and returns a new `Greeting` object with `id` and `content` attributes based on the next value from the `counter`, and formats the given `name` by using the greeting `template`.
112
-
113
-A key difference between a traditional MVC controller and the RESTful web service controller above is the way that the HTTP response body is created. Rather than relying on a link:/understanding/view-templates[view technology] to perform server-side rendering of the greeting data to HTML, this RESTful web service controller simply populates and returns a `Greeting` object. The object data will be written directly to the HTTP response as JSON.
114
-
115
-This code uses Spring 4's new http://docs.spring.io/spring/docs/{spring_version}/javadoc-api/org/springframework/web/bind/annotation/RestController.html[`@RestController`] annotation, which marks the class as a controller where every method returns a domain object instead of a view. It's shorthand for `@Controller` and `@ResponseBody` rolled together.
116
-
117
-The `Greeting` object must be converted to JSON. Thanks to Spring's HTTP message converter support, you don't need to do this conversion manually. Because http://wiki.fasterxml.com/JacksonHome[Jackson 2] is on the classpath, Spring's http://docs.spring.io/spring/docs/{spring_version}/javadoc-api/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.html[`MappingJackson2HttpMessageConverter`] is automatically chosen to convert the `Greeting` instance to JSON.
118
-
119
-
120
-== Make the application executable
121
-
122
-Although it is possible to package this service as a traditional link:/understanding/WAR[WAR] file for deployment to an external application server, the simpler approach demonstrated below creates a standalone application. You package everything in a single, executable JAR file, driven by a good old Java `main()` method. Along the way, you use Spring's support for embedding the link:/understanding/Tomcat[Tomcat] servlet container as the HTTP runtime, instead of deploying to an external instance.
123
-
124
-
125
-`src/main/java/hello/Application.java`
126
-[source,java]
127
-----
128
-include::complete/src/main/java/hello/Application.java[]
129
-----
130
-
131
-include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/spring-boot-application.adoc[]
132
-
133
-include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/build_an_executable_jar_subhead.adoc[]
134
-
135
-include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/build_an_executable_jar_with_both.adoc[]
136
-
137
-
138
-Logging output is displayed. The service should be up and running within a few seconds.
139
-
140
-
141
-== Test the service
142
-
143
-Now that the service is up, visit http://localhost:8080/greeting, where you see:
144
-
145
-[source,json]
146
-----
147
-{"id":1,"content":"Hello, World!"}
148
-----
149
-
150
-Provide a `name` query string parameter with http://localhost:8080/greeting?name=User. Notice how the value of the `content` attribute changes from "Hello, World!" to "Hello User!":
151
-
152
-[source,json]
153
-----
154
-{"id":2,"content":"Hello, User!"}
155
-----
156
-
157
-This change demonstrates that the `@RequestParam` arrangement in `GreetingController` is working as expected. The `name` parameter has been given a default value of "World", but can always be explicitly overridden through the query string.
158
-
159
-Notice also how the `id` attribute has changed from `1` to `2`. This proves that you are working against the same `GreetingController` instance across multiple requests, and that its `counter` field is being incremented on each call as expected.
160
-
161
-
162
-== Summary
163
-
164
-Congratulations! You've just developed a RESTful web service with Spring. 
165
-
166
-include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/footer.adoc[]

BIN
complete/.mvn/wrapper/maven-wrapper.jar Vedi File


+ 0
- 1
complete/.mvn/wrapper/maven-wrapper.properties Vedi File

@@ -1 +0,0 @@
1
-distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip

+ 0
- 32
complete/build.gradle Vedi File

@@ -1,32 +0,0 @@
1
-buildscript {
2
-    repositories {
3
-        mavenCentral()
4
-    }
5
-    dependencies {
6
-        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.3.RELEASE")
7
-    }
8
-}
9
-
10
-apply plugin: 'java'
11
-apply plugin: 'eclipse'
12
-apply plugin: 'idea'
13
-apply plugin: 'org.springframework.boot'
14
-
15
-jar {
16
-    baseName = 'gs-rest-service'
17
-    version =  '0.1.0'
18
-}
19
-
20
-repositories {
21
-    mavenCentral()
22
-}
23
-
24
-sourceCompatibility = 1.8
25
-targetCompatibility = 1.8
26
-
27
-dependencies {
28
-    compile("org.springframework.boot:spring-boot-starter-web")
29
-    testCompile('org.springframework.boot:spring-boot-starter-test')
30
-    testCompile('com.jayway.jsonpath:json-path')
31
-}
32
-

BIN
complete/gradle/wrapper/gradle-wrapper.jar Vedi File


+ 0
- 6
complete/gradle/wrapper/gradle-wrapper.properties Vedi File

@@ -1,6 +0,0 @@
1
-#Mon Aug 29 13:08:10 CDT 2016
2
-distributionBase=GRADLE_USER_HOME
3
-distributionPath=wrapper/dists
4
-zipStoreBase=GRADLE_USER_HOME
5
-zipStorePath=wrapper/dists
6
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip

+ 0
- 160
complete/gradlew Vedi File

@@ -1,160 +0,0 @@
1
-#!/usr/bin/env bash
2
-
3
-##############################################################################
4
-##
5
-##  Gradle start up script for UN*X
6
-##
7
-##############################################################################
8
-
9
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10
-DEFAULT_JVM_OPTS=""
11
-
12
-APP_NAME="Gradle"
13
-APP_BASE_NAME=`basename "$0"`
14
-
15
-# Use the maximum available, or set MAX_FD != -1 to use that value.
16
-MAX_FD="maximum"
17
-
18
-warn ( ) {
19
-    echo "$*"
20
-}
21
-
22
-die ( ) {
23
-    echo
24
-    echo "$*"
25
-    echo
26
-    exit 1
27
-}
28
-
29
-# OS specific support (must be 'true' or 'false').
30
-cygwin=false
31
-msys=false
32
-darwin=false
33
-case "`uname`" in
34
-  CYGWIN* )
35
-    cygwin=true
36
-    ;;
37
-  Darwin* )
38
-    darwin=true
39
-    ;;
40
-  MINGW* )
41
-    msys=true
42
-    ;;
43
-esac
44
-
45
-# Attempt to set APP_HOME
46
-# Resolve links: $0 may be a link
47
-PRG="$0"
48
-# Need this for relative symlinks.
49
-while [ -h "$PRG" ] ; do
50
-    ls=`ls -ld "$PRG"`
51
-    link=`expr "$ls" : '.*-> \(.*\)$'`
52
-    if expr "$link" : '/.*' > /dev/null; then
53
-        PRG="$link"
54
-    else
55
-        PRG=`dirname "$PRG"`"/$link"
56
-    fi
57
-done
58
-SAVED="`pwd`"
59
-cd "`dirname \"$PRG\"`/" >/dev/null
60
-APP_HOME="`pwd -P`"
61
-cd "$SAVED" >/dev/null
62
-
63
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64
-
65
-# Determine the Java command to use to start the JVM.
66
-if [ -n "$JAVA_HOME" ] ; then
67
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68
-        # IBM's JDK on AIX uses strange locations for the executables
69
-        JAVACMD="$JAVA_HOME/jre/sh/java"
70
-    else
71
-        JAVACMD="$JAVA_HOME/bin/java"
72
-    fi
73
-    if [ ! -x "$JAVACMD" ] ; then
74
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75
-
76
-Please set the JAVA_HOME variable in your environment to match the
77
-location of your Java installation."
78
-    fi
79
-else
80
-    JAVACMD="java"
81
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82
-
83
-Please set the JAVA_HOME variable in your environment to match the
84
-location of your Java installation."
85
-fi
86
-
87
-# Increase the maximum file descriptors if we can.
88
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89
-    MAX_FD_LIMIT=`ulimit -H -n`
90
-    if [ $? -eq 0 ] ; then
91
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92
-            MAX_FD="$MAX_FD_LIMIT"
93
-        fi
94
-        ulimit -n $MAX_FD
95
-        if [ $? -ne 0 ] ; then
96
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
97
-        fi
98
-    else
99
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100
-    fi
101
-fi
102
-
103
-# For Darwin, add options to specify how the application appears in the dock
104
-if $darwin; then
105
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106
-fi
107
-
108
-# For Cygwin, switch paths to Windows format before running java
109
-if $cygwin ; then
110
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112
-    JAVACMD=`cygpath --unix "$JAVACMD"`
113
-
114
-    # We build the pattern for arguments to be converted via cygpath
115
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116
-    SEP=""
117
-    for dir in $ROOTDIRSRAW ; do
118
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
119
-        SEP="|"
120
-    done
121
-    OURCYGPATTERN="(^($ROOTDIRS))"
122
-    # Add a user-defined pattern to the cygpath arguments
123
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125
-    fi
126
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
127
-    i=0
128
-    for arg in "$@" ; do
129
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
131
-
132
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
133
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134
-        else
135
-            eval `echo args$i`="\"$arg\""
136
-        fi
137
-        i=$((i+1))
138
-    done
139
-    case $i in
140
-        (0) set -- ;;
141
-        (1) set -- "$args0" ;;
142
-        (2) set -- "$args0" "$args1" ;;
143
-        (3) set -- "$args0" "$args1" "$args2" ;;
144
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150
-    esac
151
-fi
152
-
153
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154
-function splitJvmOpts() {
155
-    JVM_OPTS=("$@")
156
-}
157
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159
-
160
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

+ 0
- 90
complete/gradlew.bat Vedi File

@@ -1,90 +0,0 @@
1
-@if "%DEBUG%" == "" @echo off
2
-@rem ##########################################################################
3
-@rem
4
-@rem  Gradle startup script for Windows
5
-@rem
6
-@rem ##########################################################################
7
-
8
-@rem Set local scope for the variables with windows NT shell
9
-if "%OS%"=="Windows_NT" setlocal
10
-
11
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12
-set DEFAULT_JVM_OPTS=
13
-
14
-set DIRNAME=%~dp0
15
-if "%DIRNAME%" == "" set DIRNAME=.
16
-set APP_BASE_NAME=%~n0
17
-set APP_HOME=%DIRNAME%
18
-
19
-@rem Find java.exe
20
-if defined JAVA_HOME goto findJavaFromJavaHome
21
-
22
-set JAVA_EXE=java.exe
23
-%JAVA_EXE% -version >NUL 2>&1
24
-if "%ERRORLEVEL%" == "0" goto init
25
-
26
-echo.
27
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28
-echo.
29
-echo Please set the JAVA_HOME variable in your environment to match the
30
-echo location of your Java installation.
31
-
32
-goto fail
33
-
34
-:findJavaFromJavaHome
35
-set JAVA_HOME=%JAVA_HOME:"=%
36
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37
-
38
-if exist "%JAVA_EXE%" goto init
39
-
40
-echo.
41
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42
-echo.
43
-echo Please set the JAVA_HOME variable in your environment to match the
44
-echo location of your Java installation.
45
-
46
-goto fail
47
-
48
-:init
49
-@rem Get command-line arguments, handling Windowz variants
50
-
51
-if not "%OS%" == "Windows_NT" goto win9xME_args
52
-if "%@eval[2+2]" == "4" goto 4NT_args
53
-
54
-:win9xME_args
55
-@rem Slurp the command line arguments.
56
-set CMD_LINE_ARGS=
57
-set _SKIP=2
58
-
59
-:win9xME_args_slurp
60
-if "x%~1" == "x" goto execute
61
-
62
-set CMD_LINE_ARGS=%*
63
-goto execute
64
-
65
-:4NT_args
66
-@rem Get arguments from the 4NT Shell from JP Software
67
-set CMD_LINE_ARGS=%$
68
-
69
-:execute
70
-@rem Setup the command line
71
-
72
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73
-
74
-@rem Execute Gradle
75
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76
-
77
-:end
78
-@rem End local scope for the variables with windows NT shell
79
-if "%ERRORLEVEL%"=="0" goto mainEnd
80
-
81
-:fail
82
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83
-rem the _cmd.exe /c_ return code!
84
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85
-exit /b 1
86
-
87
-:mainEnd
88
-if "%OS%"=="Windows_NT" endlocal
89
-
90
-:omega

+ 0
- 8
complete/manifest.yml Vedi File

@@ -1,8 +0,0 @@
1
----
2
-applications:
3
-- name: gs-rest-service
4
-  memory: 256M
5
-  instances: 1
6
-  host: rest-service
7
-  domain: guides.spring.io
8
-  path: build/libs/gs-rest-service-0.1.0.jar

+ 0
- 233
complete/mvnw Vedi File

@@ -1,233 +0,0 @@
1
-#!/bin/sh
2
-# ----------------------------------------------------------------------------
3
-# Licensed to the Apache Software Foundation (ASF) under one
4
-# or more contributor license agreements.  See the NOTICE file
5
-# distributed with this work for additional information
6
-# regarding copyright ownership.  The ASF licenses this file
7
-# to you under the Apache License, Version 2.0 (the
8
-# "License"); you may not use this file except in compliance
9
-# with the License.  You may obtain a copy of the License at
10
-#
11
-#    http://www.apache.org/licenses/LICENSE-2.0
12
-#
13
-# Unless required by applicable law or agreed to in writing,
14
-# software distributed under the License is distributed on an
15
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
-# KIND, either express or implied.  See the License for the
17
-# specific language governing permissions and limitations
18
-# under the License.
19
-# ----------------------------------------------------------------------------
20
-
21
-# ----------------------------------------------------------------------------
22
-# Maven2 Start Up Batch script
23
-#
24
-# Required ENV vars:
25
-# ------------------
26
-#   JAVA_HOME - location of a JDK home dir
27
-#
28
-# Optional ENV vars
29
-# -----------------
30
-#   M2_HOME - location of maven2's installed home dir
31
-#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
32
-#     e.g. to debug Maven itself, use
33
-#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34
-#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
35
-# ----------------------------------------------------------------------------
36
-
37
-if [ -z "$MAVEN_SKIP_RC" ] ; then
38
-
39
-  if [ -f /etc/mavenrc ] ; then
40
-    . /etc/mavenrc
41
-  fi
42
-
43
-  if [ -f "$HOME/.mavenrc" ] ; then
44
-    . "$HOME/.mavenrc"
45
-  fi
46
-
47
-fi
48
-
49
-# OS specific support.  $var _must_ be set to either true or false.
50
-cygwin=false;
51
-darwin=false;
52
-mingw=false
53
-case "`uname`" in
54
-  CYGWIN*) cygwin=true ;;
55
-  MINGW*) mingw=true;;
56
-  Darwin*) darwin=true
57
-           #
58
-           # Look for the Apple JDKs first to preserve the existing behaviour, and then look
59
-           # for the new JDKs provided by Oracle.
60
-           #
61
-           if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
62
-             #
63
-             # Apple JDKs
64
-             #
65
-             export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
66
-           fi
67
-
68
-           if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
69
-             #
70
-             # Apple JDKs
71
-             #
72
-             export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
73
-           fi
74
-
75
-           if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
76
-             #
77
-             # Oracle JDKs
78
-             #
79
-             export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
80
-           fi
81
-
82
-           if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
83
-             #
84
-             # Apple JDKs
85
-             #
86
-             export JAVA_HOME=`/usr/libexec/java_home`
87
-           fi
88
-           ;;
89
-esac
90
-
91
-if [ -z "$JAVA_HOME" ] ; then
92
-  if [ -r /etc/gentoo-release ] ; then
93
-    JAVA_HOME=`java-config --jre-home`
94
-  fi
95
-fi
96
-
97
-if [ -z "$M2_HOME" ] ; then
98
-  ## resolve links - $0 may be a link to maven's home
99
-  PRG="$0"
100
-
101
-  # need this for relative symlinks
102
-  while [ -h "$PRG" ] ; do
103
-    ls=`ls -ld "$PRG"`
104
-    link=`expr "$ls" : '.*-> \(.*\)$'`
105
-    if expr "$link" : '/.*' > /dev/null; then
106
-      PRG="$link"
107
-    else
108
-      PRG="`dirname "$PRG"`/$link"
109
-    fi
110
-  done
111
-
112
-  saveddir=`pwd`
113
-
114
-  M2_HOME=`dirname "$PRG"`/..
115
-
116
-  # make it fully qualified
117
-  M2_HOME=`cd "$M2_HOME" && pwd`
118
-
119
-  cd "$saveddir"
120
-  # echo Using m2 at $M2_HOME
121
-fi
122
-
123
-# For Cygwin, ensure paths are in UNIX format before anything is touched
124
-if $cygwin ; then
125
-  [ -n "$M2_HOME" ] &&
126
-    M2_HOME=`cygpath --unix "$M2_HOME"`
127
-  [ -n "$JAVA_HOME" ] &&
128
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
129
-  [ -n "$CLASSPATH" ] &&
130
-    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
131
-fi
132
-
133
-# For Migwn, ensure paths are in UNIX format before anything is touched
134
-if $mingw ; then
135
-  [ -n "$M2_HOME" ] &&
136
-    M2_HOME="`(cd "$M2_HOME"; pwd)`"
137
-  [ -n "$JAVA_HOME" ] &&
138
-    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
139
-  # TODO classpath?
140
-fi
141
-
142
-if [ -z "$JAVA_HOME" ]; then
143
-  javaExecutable="`which javac`"
144
-  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
145
-    # readlink(1) is not available as standard on Solaris 10.
146
-    readLink=`which readlink`
147
-    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
148
-      if $darwin ; then
149
-        javaHome="`dirname \"$javaExecutable\"`"
150
-        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
151
-      else
152
-        javaExecutable="`readlink -f \"$javaExecutable\"`"
153
-      fi
154
-      javaHome="`dirname \"$javaExecutable\"`"
155
-      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
156
-      JAVA_HOME="$javaHome"
157
-      export JAVA_HOME
158
-    fi
159
-  fi
160
-fi
161
-
162
-if [ -z "$JAVACMD" ] ; then
163
-  if [ -n "$JAVA_HOME"  ] ; then
164
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
165
-      # IBM's JDK on AIX uses strange locations for the executables
166
-      JAVACMD="$JAVA_HOME/jre/sh/java"
167
-    else
168
-      JAVACMD="$JAVA_HOME/bin/java"
169
-    fi
170
-  else
171
-    JAVACMD="`which java`"
172
-  fi
173
-fi
174
-
175
-if [ ! -x "$JAVACMD" ] ; then
176
-  echo "Error: JAVA_HOME is not defined correctly." >&2
177
-  echo "  We cannot execute $JAVACMD" >&2
178
-  exit 1
179
-fi
180
-
181
-if [ -z "$JAVA_HOME" ] ; then
182
-  echo "Warning: JAVA_HOME environment variable is not set."
183
-fi
184
-
185
-CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
186
-
187
-# For Cygwin, switch paths to Windows format before running java
188
-if $cygwin; then
189
-  [ -n "$M2_HOME" ] &&
190
-    M2_HOME=`cygpath --path --windows "$M2_HOME"`
191
-  [ -n "$JAVA_HOME" ] &&
192
-    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
193
-  [ -n "$CLASSPATH" ] &&
194
-    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
195
-fi
196
-
197
-# traverses directory structure from process work directory to filesystem root
198
-# first directory with .mvn subdirectory is considered project base directory
199
-find_maven_basedir() {
200
-  local basedir=$(pwd)
201
-  local wdir=$(pwd)
202
-  while [ "$wdir" != '/' ] ; do
203
-    if [ -d "$wdir"/.mvn ] ; then
204
-      basedir=$wdir
205
-      break
206
-    fi
207
-    wdir=$(cd "$wdir/.."; pwd)
208
-  done
209
-  echo "${basedir}"
210
-}
211
-
212
-# concatenates all lines of a file
213
-concat_lines() {
214
-  if [ -f "$1" ]; then
215
-    echo "$(tr -s '\n' ' ' < "$1")"
216
-  fi
217
-}
218
-
219
-export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
220
-MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
221
-
222
-# Provide a "standardized" way to retrieve the CLI args that will
223
-# work with both Windows and non-Windows executions.
224
-MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
225
-export MAVEN_CMD_LINE_ARGS
226
-
227
-WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
228
-
229
-exec "$JAVACMD" \
230
-  $MAVEN_OPTS \
231
-  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
232
-  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
233
-  ${WRAPPER_LAUNCHER} "$@"

+ 0
- 145
complete/mvnw.cmd Vedi File

@@ -1,145 +0,0 @@
1
-@REM ----------------------------------------------------------------------------
2
-@REM Licensed to the Apache Software Foundation (ASF) under one
3
-@REM or more contributor license agreements.  See the NOTICE file
4
-@REM distributed with this work for additional information
5
-@REM regarding copyright ownership.  The ASF licenses this file
6
-@REM to you under the Apache License, Version 2.0 (the
7
-@REM "License"); you may not use this file except in compliance
8
-@REM with the License.  You may obtain a copy of the License at
9
-@REM
10
-@REM    http://www.apache.org/licenses/LICENSE-2.0
11
-@REM
12
-@REM Unless required by applicable law or agreed to in writing,
13
-@REM software distributed under the License is distributed on an
14
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
-@REM KIND, either express or implied.  See the License for the
16
-@REM specific language governing permissions and limitations
17
-@REM under the License.
18
-@REM ----------------------------------------------------------------------------
19
-
20
-@REM ----------------------------------------------------------------------------
21
-@REM Maven2 Start Up Batch script
22
-@REM
23
-@REM Required ENV vars:
24
-@REM JAVA_HOME - location of a JDK home dir
25
-@REM
26
-@REM Optional ENV vars
27
-@REM M2_HOME - location of maven2's installed home dir
28
-@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29
-@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
30
-@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
31
-@REM     e.g. to debug Maven itself, use
32
-@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33
-@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
34
-@REM ----------------------------------------------------------------------------
35
-
36
-@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
37
-@echo off
38
-@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
39
-@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
40
-
41
-@REM set %HOME% to equivalent of $HOME
42
-if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
43
-
44
-@REM Execute a user defined script before this one
45
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
46
-@REM check for pre script, once with legacy .bat ending and once with .cmd ending
47
-if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
48
-if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
49
-:skipRcPre
50
-
51
-@setlocal
52
-
53
-set ERROR_CODE=0
54
-
55
-@REM To isolate internal variables from possible post scripts, we use another setlocal
56
-@setlocal
57
-
58
-@REM ==== START VALIDATION ====
59
-if not "%JAVA_HOME%" == "" goto OkJHome
60
-
61
-echo.
62
-echo Error: JAVA_HOME not found in your environment. >&2
63
-echo Please set the JAVA_HOME variable in your environment to match the >&2
64
-echo location of your Java installation. >&2
65
-echo.
66
-goto error
67
-
68
-:OkJHome
69
-if exist "%JAVA_HOME%\bin\java.exe" goto init
70
-
71
-echo.
72
-echo Error: JAVA_HOME is set to an invalid directory. >&2
73
-echo JAVA_HOME = "%JAVA_HOME%" >&2
74
-echo Please set the JAVA_HOME variable in your environment to match the >&2
75
-echo location of your Java installation. >&2
76
-echo.
77
-goto error
78
-
79
-@REM ==== END VALIDATION ====
80
-
81
-:init
82
-
83
-set MAVEN_CMD_LINE_ARGS=%*
84
-
85
-@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
86
-@REM Fallback to current working directory if not found.
87
-
88
-set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
89
-IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
90
-
91
-set EXEC_DIR=%CD%
92
-set WDIR=%EXEC_DIR%
93
-:findBaseDir
94
-IF EXIST "%WDIR%"\.mvn goto baseDirFound
95
-cd ..
96
-IF "%WDIR%"=="%CD%" goto baseDirNotFound
97
-set WDIR=%CD%
98
-goto findBaseDir
99
-
100
-:baseDirFound
101
-set MAVEN_PROJECTBASEDIR=%WDIR%
102
-cd "%EXEC_DIR%"
103
-goto endDetectBaseDir
104
-
105
-:baseDirNotFound
106
-set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
107
-cd "%EXEC_DIR%"
108
-
109
-:endDetectBaseDir
110
-
111
-IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
112
-
113
-@setlocal EnableExtensions EnableDelayedExpansion
114
-for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
115
-@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
116
-
117
-:endReadAdditionalConfig
118
-
119
-SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
120
-
121
-set WRAPPER_JAR="".\.mvn\wrapper\maven-wrapper.jar""
122
-set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
123
-
124
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
125
-if ERRORLEVEL 1 goto error
126
-goto end
127
-
128
-:error
129
-set ERROR_CODE=1
130
-
131
-:end
132
-@endlocal & set ERROR_CODE=%ERROR_CODE%
133
-
134
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
135
-@REM check for post script, once with legacy .bat ending and once with .cmd ending
136
-if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
137
-if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
138
-:skipRcPost
139
-
140
-@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
141
-if "%MAVEN_BATCH_PAUSE%" == "on" pause
142
-
143
-if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
144
-
145
-exit /B %ERROR_CODE%

+ 0
- 59
complete/pom.xml Vedi File

@@ -1,59 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4
-    <modelVersion>4.0.0</modelVersion>
5
-
6
-    <groupId>org.springframework</groupId>
7
-    <artifactId>gs-rest-service</artifactId>
8
-    <version>0.1.0</version>
9
-
10
-    <parent>
11
-        <groupId>org.springframework.boot</groupId>
12
-        <artifactId>spring-boot-starter-parent</artifactId>
13
-        <version>1.5.3.RELEASE</version>
14
-    </parent>
15
-
16
-    <dependencies>
17
-        <dependency>
18
-            <groupId>org.springframework.boot</groupId>
19
-            <artifactId>spring-boot-starter-web</artifactId>
20
-        </dependency>
21
-        <dependency>
22
-            <groupId>org.springframework.boot</groupId>
23
-            <artifactId>spring-boot-starter-test</artifactId>
24
-            <scope>test</scope>
25
-        </dependency>
26
-        <dependency>
27
-            <groupId>com.jayway.jsonpath</groupId>
28
-            <artifactId>json-path</artifactId>
29
-            <scope>test</scope>
30
-        </dependency>
31
-    </dependencies>
32
-
33
-    <properties>
34
-        <java.version>1.8</java.version>
35
-    </properties>
36
-
37
-
38
-    <build>
39
-        <plugins>
40
-            <plugin>
41
-                <groupId>org.springframework.boot</groupId>
42
-                <artifactId>spring-boot-maven-plugin</artifactId>
43
-            </plugin>
44
-        </plugins>
45
-    </build>
46
-
47
-    <repositories>
48
-        <repository>
49
-            <id>spring-releases</id>
50
-            <url>https://repo.spring.io/libs-release</url>
51
-        </repository>
52
-    </repositories>
53
-    <pluginRepositories>
54
-        <pluginRepository>
55
-            <id>spring-releases</id>
56
-            <url>https://repo.spring.io/libs-release</url>
57
-        </pluginRepository>
58
-    </pluginRepositories>
59
-</project>

+ 0
- 12
complete/src/main/java/hello/Application.java Vedi File

@@ -1,12 +0,0 @@
1
-package hello;
2
-
3
-import org.springframework.boot.SpringApplication;
4
-import org.springframework.boot.autoconfigure.SpringBootApplication;
5
-
6
-@SpringBootApplication
7
-public class Application {
8
-
9
-    public static void main(String[] args) {
10
-        SpringApplication.run(Application.class, args);
11
-    }
12
-}

+ 0
- 20
complete/src/main/java/hello/Greeting.java Vedi File

@@ -1,20 +0,0 @@
1
-package hello;
2
-
3
-public class Greeting {
4
-
5
-    private final long id;
6
-    private final String content;
7
-
8
-    public Greeting(long id, String content) {
9
-        this.id = id;
10
-        this.content = content;
11
-    }
12
-
13
-    public long getId() {
14
-        return id;
15
-    }
16
-
17
-    public String getContent() {
18
-        return content;
19
-    }
20
-}

+ 0
- 19
complete/src/main/java/hello/GreetingController.java Vedi File

@@ -1,19 +0,0 @@
1
-package hello;
2
-
3
-import java.util.concurrent.atomic.AtomicLong;
4
-import org.springframework.web.bind.annotation.RequestMapping;
5
-import org.springframework.web.bind.annotation.RequestParam;
6
-import org.springframework.web.bind.annotation.RestController;
7
-
8
-@RestController
9
-public class GreetingController {
10
-
11
-    private static final String template = "Hello, %s!";
12
-    private final AtomicLong counter = new AtomicLong();
13
-
14
-    @RequestMapping("/greeting")
15
-    public Greeting greeting(@RequestParam(value="name", defaultValue="World") String name) {
16
-        return new Greeting(counter.incrementAndGet(),
17
-                            String.format(template, name));
18
-    }
19
-}

+ 0
- 54
complete/src/test/java/hello/GreetingControllerTests.java Vedi File

@@ -1,54 +0,0 @@
1
-/*
2
- * Copyright 2016 the original author or authors.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- *      http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-package hello;
17
-
18
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
19
-import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
20
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
21
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
22
-
23
-import org.junit.Test;
24
-import org.junit.runner.RunWith;
25
-import org.springframework.beans.factory.annotation.Autowired;
26
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
27
-import org.springframework.boot.test.context.SpringBootTest;
28
-import org.springframework.test.context.junit4.SpringRunner;
29
-import org.springframework.test.web.servlet.MockMvc;
30
-
31
-@RunWith(SpringRunner.class)
32
-@SpringBootTest
33
-@AutoConfigureMockMvc
34
-public class GreetingControllerTests {
35
-
36
-    @Autowired
37
-    private MockMvc mockMvc;
38
-
39
-    @Test
40
-    public void noParamGreetingShouldReturnDefaultMessage() throws Exception {
41
-
42
-        this.mockMvc.perform(get("/greeting")).andDo(print()).andExpect(status().isOk())
43
-                .andExpect(jsonPath("$.content").value("Hello, World!"));
44
-    }
45
-
46
-    @Test
47
-    public void paramGreetingShouldReturnTailoredMessage() throws Exception {
48
-
49
-        this.mockMvc.perform(get("/greeting").param("name", "Spring Community"))
50
-                .andDo(print()).andExpect(status().isOk())
51
-                .andExpect(jsonPath("$.content").value("Hello, Spring Community!"));
52
-    }
53
-
54
-}

BIN
initial/.mvn/wrapper/maven-wrapper.jar Vedi File


+ 0
- 1
initial/.mvn/wrapper/maven-wrapper.properties Vedi File

@@ -1 +0,0 @@
1
-distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip

+ 0
- 31
initial/build.gradle Vedi File

@@ -1,31 +0,0 @@
1
-buildscript {
2
-    repositories {
3
-        mavenCentral()
4
-    }
5
-    dependencies {
6
-        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.3.RELEASE")
7
-    }
8
-}
9
-
10
-apply plugin: 'java'
11
-apply plugin: 'eclipse'
12
-apply plugin: 'idea'
13
-apply plugin: 'org.springframework.boot'
14
-
15
-jar {
16
-    baseName = 'gs-rest-service'
17
-    version =  '0.1.0'
18
-}
19
-
20
-repositories {
21
-    mavenCentral()
22
-}
23
-
24
-sourceCompatibility = 1.8
25
-targetCompatibility = 1.8
26
-
27
-dependencies {
28
-    compile("org.springframework.boot:spring-boot-starter-web")
29
-    testCompile('org.springframework.boot:spring-boot-starter-test')
30
-}
31
-

BIN
initial/gradle/wrapper/gradle-wrapper.jar Vedi File


+ 0
- 6
initial/gradle/wrapper/gradle-wrapper.properties Vedi File

@@ -1,6 +0,0 @@
1
-#Mon Aug 29 13:08:14 CDT 2016
2
-distributionBase=GRADLE_USER_HOME
3
-distributionPath=wrapper/dists
4
-zipStoreBase=GRADLE_USER_HOME
5
-zipStorePath=wrapper/dists
6
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip

+ 0
- 160
initial/gradlew Vedi File

@@ -1,160 +0,0 @@
1
-#!/usr/bin/env bash
2
-
3
-##############################################################################
4
-##
5
-##  Gradle start up script for UN*X
6
-##
7
-##############################################################################
8
-
9
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10
-DEFAULT_JVM_OPTS=""
11
-
12
-APP_NAME="Gradle"
13
-APP_BASE_NAME=`basename "$0"`
14
-
15
-# Use the maximum available, or set MAX_FD != -1 to use that value.
16
-MAX_FD="maximum"
17
-
18
-warn ( ) {
19
-    echo "$*"
20
-}
21
-
22
-die ( ) {
23
-    echo
24
-    echo "$*"
25
-    echo
26
-    exit 1
27
-}
28
-
29
-# OS specific support (must be 'true' or 'false').
30
-cygwin=false
31
-msys=false
32
-darwin=false
33
-case "`uname`" in
34
-  CYGWIN* )
35
-    cygwin=true
36
-    ;;
37
-  Darwin* )
38
-    darwin=true
39
-    ;;
40
-  MINGW* )
41
-    msys=true
42
-    ;;
43
-esac
44
-
45
-# Attempt to set APP_HOME
46
-# Resolve links: $0 may be a link
47
-PRG="$0"
48
-# Need this for relative symlinks.
49
-while [ -h "$PRG" ] ; do
50
-    ls=`ls -ld "$PRG"`
51
-    link=`expr "$ls" : '.*-> \(.*\)$'`
52
-    if expr "$link" : '/.*' > /dev/null; then
53
-        PRG="$link"
54
-    else
55
-        PRG=`dirname "$PRG"`"/$link"
56
-    fi
57
-done
58
-SAVED="`pwd`"
59
-cd "`dirname \"$PRG\"`/" >/dev/null
60
-APP_HOME="`pwd -P`"
61
-cd "$SAVED" >/dev/null
62
-
63
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64
-
65
-# Determine the Java command to use to start the JVM.
66
-if [ -n "$JAVA_HOME" ] ; then
67
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68
-        # IBM's JDK on AIX uses strange locations for the executables
69
-        JAVACMD="$JAVA_HOME/jre/sh/java"
70
-    else
71
-        JAVACMD="$JAVA_HOME/bin/java"
72
-    fi
73
-    if [ ! -x "$JAVACMD" ] ; then
74
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75
-
76
-Please set the JAVA_HOME variable in your environment to match the
77
-location of your Java installation."
78
-    fi
79
-else
80
-    JAVACMD="java"
81
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82
-
83
-Please set the JAVA_HOME variable in your environment to match the
84
-location of your Java installation."
85
-fi
86
-
87
-# Increase the maximum file descriptors if we can.
88
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89
-    MAX_FD_LIMIT=`ulimit -H -n`
90
-    if [ $? -eq 0 ] ; then
91
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92
-            MAX_FD="$MAX_FD_LIMIT"
93
-        fi
94
-        ulimit -n $MAX_FD
95
-        if [ $? -ne 0 ] ; then
96
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
97
-        fi
98
-    else
99
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100
-    fi
101
-fi
102
-
103
-# For Darwin, add options to specify how the application appears in the dock
104
-if $darwin; then
105
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106
-fi
107
-
108
-# For Cygwin, switch paths to Windows format before running java
109
-if $cygwin ; then
110
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112
-    JAVACMD=`cygpath --unix "$JAVACMD"`
113
-
114
-    # We build the pattern for arguments to be converted via cygpath
115
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116
-    SEP=""
117
-    for dir in $ROOTDIRSRAW ; do
118
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
119
-        SEP="|"
120
-    done
121
-    OURCYGPATTERN="(^($ROOTDIRS))"
122
-    # Add a user-defined pattern to the cygpath arguments
123
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125
-    fi
126
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
127
-    i=0
128
-    for arg in "$@" ; do
129
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
131
-
132
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
133
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134
-        else
135
-            eval `echo args$i`="\"$arg\""
136
-        fi
137
-        i=$((i+1))
138
-    done
139
-    case $i in
140
-        (0) set -- ;;
141
-        (1) set -- "$args0" ;;
142
-        (2) set -- "$args0" "$args1" ;;
143
-        (3) set -- "$args0" "$args1" "$args2" ;;
144
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150
-    esac
151
-fi
152
-
153
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154
-function splitJvmOpts() {
155
-    JVM_OPTS=("$@")
156
-}
157
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159
-
160
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

+ 0
- 90
initial/gradlew.bat Vedi File

@@ -1,90 +0,0 @@
1
-@if "%DEBUG%" == "" @echo off
2
-@rem ##########################################################################
3
-@rem
4
-@rem  Gradle startup script for Windows
5
-@rem
6
-@rem ##########################################################################
7
-
8
-@rem Set local scope for the variables with windows NT shell
9
-if "%OS%"=="Windows_NT" setlocal
10
-
11
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12
-set DEFAULT_JVM_OPTS=
13
-
14
-set DIRNAME=%~dp0
15
-if "%DIRNAME%" == "" set DIRNAME=.
16
-set APP_BASE_NAME=%~n0
17
-set APP_HOME=%DIRNAME%
18
-
19
-@rem Find java.exe
20
-if defined JAVA_HOME goto findJavaFromJavaHome
21
-
22
-set JAVA_EXE=java.exe
23
-%JAVA_EXE% -version >NUL 2>&1
24
-if "%ERRORLEVEL%" == "0" goto init
25
-
26
-echo.
27
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28
-echo.
29
-echo Please set the JAVA_HOME variable in your environment to match the
30
-echo location of your Java installation.
31
-
32
-goto fail
33
-
34
-:findJavaFromJavaHome
35
-set JAVA_HOME=%JAVA_HOME:"=%
36
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37
-
38
-if exist "%JAVA_EXE%" goto init
39
-
40
-echo.
41
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42
-echo.
43
-echo Please set the JAVA_HOME variable in your environment to match the
44
-echo location of your Java installation.
45
-
46
-goto fail
47
-
48
-:init
49
-@rem Get command-line arguments, handling Windowz variants
50
-
51
-if not "%OS%" == "Windows_NT" goto win9xME_args
52
-if "%@eval[2+2]" == "4" goto 4NT_args
53
-
54
-:win9xME_args
55
-@rem Slurp the command line arguments.
56
-set CMD_LINE_ARGS=
57
-set _SKIP=2
58
-
59
-:win9xME_args_slurp
60
-if "x%~1" == "x" goto execute
61
-
62
-set CMD_LINE_ARGS=%*
63
-goto execute
64
-
65
-:4NT_args
66
-@rem Get arguments from the 4NT Shell from JP Software
67
-set CMD_LINE_ARGS=%$
68
-
69
-:execute
70
-@rem Setup the command line
71
-
72
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73
-
74
-@rem Execute Gradle
75
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76
-
77
-:end
78
-@rem End local scope for the variables with windows NT shell
79
-if "%ERRORLEVEL%"=="0" goto mainEnd
80
-
81
-:fail
82
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83
-rem the _cmd.exe /c_ return code!
84
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85
-exit /b 1
86
-
87
-:mainEnd
88
-if "%OS%"=="Windows_NT" endlocal
89
-
90
-:omega

+ 0
- 233
initial/mvnw Vedi File

@@ -1,233 +0,0 @@
1
-#!/bin/sh
2
-# ----------------------------------------------------------------------------
3
-# Licensed to the Apache Software Foundation (ASF) under one
4
-# or more contributor license agreements.  See the NOTICE file
5
-# distributed with this work for additional information
6
-# regarding copyright ownership.  The ASF licenses this file
7
-# to you under the Apache License, Version 2.0 (the
8
-# "License"); you may not use this file except in compliance
9
-# with the License.  You may obtain a copy of the License at
10
-#
11
-#    http://www.apache.org/licenses/LICENSE-2.0
12
-#
13
-# Unless required by applicable law or agreed to in writing,
14
-# software distributed under the License is distributed on an
15
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
-# KIND, either express or implied.  See the License for the
17
-# specific language governing permissions and limitations
18
-# under the License.
19
-# ----------------------------------------------------------------------------
20
-
21
-# ----------------------------------------------------------------------------
22
-# Maven2 Start Up Batch script
23
-#
24
-# Required ENV vars:
25
-# ------------------
26
-#   JAVA_HOME - location of a JDK home dir
27
-#
28
-# Optional ENV vars
29
-# -----------------
30
-#   M2_HOME - location of maven2's installed home dir
31
-#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
32
-#     e.g. to debug Maven itself, use
33
-#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34
-#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
35
-# ----------------------------------------------------------------------------
36
-
37
-if [ -z "$MAVEN_SKIP_RC" ] ; then
38
-
39
-  if [ -f /etc/mavenrc ] ; then
40
-    . /etc/mavenrc
41
-  fi
42
-
43
-  if [ -f "$HOME/.mavenrc" ] ; then
44
-    . "$HOME/.mavenrc"
45
-  fi
46
-
47
-fi
48
-
49
-# OS specific support.  $var _must_ be set to either true or false.
50
-cygwin=false;
51
-darwin=false;
52
-mingw=false
53
-case "`uname`" in
54
-  CYGWIN*) cygwin=true ;;
55
-  MINGW*) mingw=true;;
56
-  Darwin*) darwin=true
57
-           #
58
-           # Look for the Apple JDKs first to preserve the existing behaviour, and then look
59
-           # for the new JDKs provided by Oracle.
60
-           #
61
-           if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
62
-             #
63
-             # Apple JDKs
64
-             #
65
-             export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
66
-           fi
67
-
68
-           if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
69
-             #
70
-             # Apple JDKs
71
-             #
72
-             export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
73
-           fi
74
-
75
-           if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
76
-             #
77
-             # Oracle JDKs
78
-             #
79
-             export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
80
-           fi
81
-
82
-           if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
83
-             #
84
-             # Apple JDKs
85
-             #
86
-             export JAVA_HOME=`/usr/libexec/java_home`
87
-           fi
88
-           ;;
89
-esac
90
-
91
-if [ -z "$JAVA_HOME" ] ; then
92
-  if [ -r /etc/gentoo-release ] ; then
93
-    JAVA_HOME=`java-config --jre-home`
94
-  fi
95
-fi
96
-
97
-if [ -z "$M2_HOME" ] ; then
98
-  ## resolve links - $0 may be a link to maven's home
99
-  PRG="$0"
100
-
101
-  # need this for relative symlinks
102
-  while [ -h "$PRG" ] ; do
103
-    ls=`ls -ld "$PRG"`
104
-    link=`expr "$ls" : '.*-> \(.*\)$'`
105
-    if expr "$link" : '/.*' > /dev/null; then
106
-      PRG="$link"
107
-    else
108
-      PRG="`dirname "$PRG"`/$link"
109
-    fi
110
-  done
111
-
112
-  saveddir=`pwd`
113
-
114
-  M2_HOME=`dirname "$PRG"`/..
115
-
116
-  # make it fully qualified
117
-  M2_HOME=`cd "$M2_HOME" && pwd`
118
-
119
-  cd "$saveddir"
120
-  # echo Using m2 at $M2_HOME
121
-fi
122
-
123
-# For Cygwin, ensure paths are in UNIX format before anything is touched
124
-if $cygwin ; then
125
-  [ -n "$M2_HOME" ] &&
126
-    M2_HOME=`cygpath --unix "$M2_HOME"`
127
-  [ -n "$JAVA_HOME" ] &&
128
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
129
-  [ -n "$CLASSPATH" ] &&
130
-    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
131
-fi
132
-
133
-# For Migwn, ensure paths are in UNIX format before anything is touched
134
-if $mingw ; then
135
-  [ -n "$M2_HOME" ] &&
136
-    M2_HOME="`(cd "$M2_HOME"; pwd)`"
137
-  [ -n "$JAVA_HOME" ] &&
138
-    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
139
-  # TODO classpath?
140
-fi
141
-
142
-if [ -z "$JAVA_HOME" ]; then
143
-  javaExecutable="`which javac`"
144
-  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
145
-    # readlink(1) is not available as standard on Solaris 10.
146
-    readLink=`which readlink`
147
-    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
148
-      if $darwin ; then
149
-        javaHome="`dirname \"$javaExecutable\"`"
150
-        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
151
-      else
152
-        javaExecutable="`readlink -f \"$javaExecutable\"`"
153
-      fi
154
-      javaHome="`dirname \"$javaExecutable\"`"
155
-      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
156
-      JAVA_HOME="$javaHome"
157
-      export JAVA_HOME
158
-    fi
159
-  fi
160
-fi
161
-
162
-if [ -z "$JAVACMD" ] ; then
163
-  if [ -n "$JAVA_HOME"  ] ; then
164
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
165
-      # IBM's JDK on AIX uses strange locations for the executables
166
-      JAVACMD="$JAVA_HOME/jre/sh/java"
167
-    else
168
-      JAVACMD="$JAVA_HOME/bin/java"
169
-    fi
170
-  else
171
-    JAVACMD="`which java`"
172
-  fi
173
-fi
174
-
175
-if [ ! -x "$JAVACMD" ] ; then
176
-  echo "Error: JAVA_HOME is not defined correctly." >&2
177
-  echo "  We cannot execute $JAVACMD" >&2
178
-  exit 1
179
-fi
180
-
181
-if [ -z "$JAVA_HOME" ] ; then
182
-  echo "Warning: JAVA_HOME environment variable is not set."
183
-fi
184
-
185
-CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
186
-
187
-# For Cygwin, switch paths to Windows format before running java
188
-if $cygwin; then
189
-  [ -n "$M2_HOME" ] &&
190
-    M2_HOME=`cygpath --path --windows "$M2_HOME"`
191
-  [ -n "$JAVA_HOME" ] &&
192
-    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
193
-  [ -n "$CLASSPATH" ] &&
194
-    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
195
-fi
196
-
197
-# traverses directory structure from process work directory to filesystem root
198
-# first directory with .mvn subdirectory is considered project base directory
199
-find_maven_basedir() {
200
-  local basedir=$(pwd)
201
-  local wdir=$(pwd)
202
-  while [ "$wdir" != '/' ] ; do
203
-    if [ -d "$wdir"/.mvn ] ; then
204
-      basedir=$wdir
205
-      break
206
-    fi
207
-    wdir=$(cd "$wdir/.."; pwd)
208
-  done
209
-  echo "${basedir}"
210
-}
211
-
212
-# concatenates all lines of a file
213
-concat_lines() {
214
-  if [ -f "$1" ]; then
215
-    echo "$(tr -s '\n' ' ' < "$1")"
216
-  fi
217
-}
218
-
219
-export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
220
-MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
221
-
222
-# Provide a "standardized" way to retrieve the CLI args that will
223
-# work with both Windows and non-Windows executions.
224
-MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
225
-export MAVEN_CMD_LINE_ARGS
226
-
227
-WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
228
-
229
-exec "$JAVACMD" \
230
-  $MAVEN_OPTS \
231
-  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
232
-  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
233
-  ${WRAPPER_LAUNCHER} "$@"

+ 0
- 145
initial/mvnw.cmd Vedi File

@@ -1,145 +0,0 @@
1
-@REM ----------------------------------------------------------------------------
2
-@REM Licensed to the Apache Software Foundation (ASF) under one
3
-@REM or more contributor license agreements.  See the NOTICE file
4
-@REM distributed with this work for additional information
5
-@REM regarding copyright ownership.  The ASF licenses this file
6
-@REM to you under the Apache License, Version 2.0 (the
7
-@REM "License"); you may not use this file except in compliance
8
-@REM with the License.  You may obtain a copy of the License at
9
-@REM
10
-@REM    http://www.apache.org/licenses/LICENSE-2.0
11
-@REM
12
-@REM Unless required by applicable law or agreed to in writing,
13
-@REM software distributed under the License is distributed on an
14
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
-@REM KIND, either express or implied.  See the License for the
16
-@REM specific language governing permissions and limitations
17
-@REM under the License.
18
-@REM ----------------------------------------------------------------------------
19
-
20
-@REM ----------------------------------------------------------------------------
21
-@REM Maven2 Start Up Batch script
22
-@REM
23
-@REM Required ENV vars:
24
-@REM JAVA_HOME - location of a JDK home dir
25
-@REM
26
-@REM Optional ENV vars
27
-@REM M2_HOME - location of maven2's installed home dir
28
-@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29
-@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
30
-@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
31
-@REM     e.g. to debug Maven itself, use
32
-@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33
-@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
34
-@REM ----------------------------------------------------------------------------
35
-
36
-@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
37
-@echo off
38
-@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
39
-@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
40
-
41
-@REM set %HOME% to equivalent of $HOME
42
-if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
43
-
44
-@REM Execute a user defined script before this one
45
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
46
-@REM check for pre script, once with legacy .bat ending and once with .cmd ending
47
-if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
48
-if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
49
-:skipRcPre
50
-
51
-@setlocal
52
-
53
-set ERROR_CODE=0
54
-
55
-@REM To isolate internal variables from possible post scripts, we use another setlocal
56
-@setlocal
57
-
58
-@REM ==== START VALIDATION ====
59
-if not "%JAVA_HOME%" == "" goto OkJHome
60
-
61
-echo.
62
-echo Error: JAVA_HOME not found in your environment. >&2
63
-echo Please set the JAVA_HOME variable in your environment to match the >&2
64
-echo location of your Java installation. >&2
65
-echo.
66
-goto error
67
-
68
-:OkJHome
69
-if exist "%JAVA_HOME%\bin\java.exe" goto init
70
-
71
-echo.
72
-echo Error: JAVA_HOME is set to an invalid directory. >&2
73
-echo JAVA_HOME = "%JAVA_HOME%" >&2
74
-echo Please set the JAVA_HOME variable in your environment to match the >&2
75
-echo location of your Java installation. >&2
76
-echo.
77
-goto error
78
-
79
-@REM ==== END VALIDATION ====
80
-
81
-:init
82
-
83
-set MAVEN_CMD_LINE_ARGS=%*
84
-
85
-@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
86
-@REM Fallback to current working directory if not found.
87
-
88
-set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
89
-IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
90
-
91
-set EXEC_DIR=%CD%
92
-set WDIR=%EXEC_DIR%
93
-:findBaseDir
94
-IF EXIST "%WDIR%"\.mvn goto baseDirFound
95
-cd ..
96
-IF "%WDIR%"=="%CD%" goto baseDirNotFound
97
-set WDIR=%CD%
98
-goto findBaseDir
99
-
100
-:baseDirFound
101
-set MAVEN_PROJECTBASEDIR=%WDIR%
102
-cd "%EXEC_DIR%"
103
-goto endDetectBaseDir
104
-
105
-:baseDirNotFound
106
-set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
107
-cd "%EXEC_DIR%"
108
-
109
-:endDetectBaseDir
110
-
111
-IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
112
-
113
-@setlocal EnableExtensions EnableDelayedExpansion
114
-for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
115
-@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
116
-
117
-:endReadAdditionalConfig
118
-
119
-SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
120
-
121
-set WRAPPER_JAR="".\.mvn\wrapper\maven-wrapper.jar""
122
-set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
123
-
124
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
125
-if ERRORLEVEL 1 goto error
126
-goto end
127
-
128
-:error
129
-set ERROR_CODE=1
130
-
131
-:end
132
-@endlocal & set ERROR_CODE=%ERROR_CODE%
133
-
134
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
135
-@REM check for post script, once with legacy .bat ending and once with .cmd ending
136
-if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
137
-if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
138
-:skipRcPost
139
-
140
-@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
141
-if "%MAVEN_BATCH_PAUSE%" == "on" pause
142
-
143
-if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
144
-
145
-exit /B %ERROR_CODE%

+ 0
- 59
initial/pom.xml Vedi File

@@ -1,59 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4
-    <modelVersion>4.0.0</modelVersion>
5
-
6
-    <groupId>org.springframework</groupId>
7
-    <artifactId>gs-rest-service</artifactId>
8
-    <version>0.1.0</version>
9
-
10
-    <parent>
11
-        <groupId>org.springframework.boot</groupId>
12
-        <artifactId>spring-boot-starter-parent</artifactId>
13
-        <version>1.5.3.RELEASE</version>
14
-    </parent>
15
-
16
-    <dependencies>
17
-        <dependency>
18
-            <groupId>org.springframework.boot</groupId>
19
-            <artifactId>spring-boot-starter-web</artifactId>
20
-        </dependency>
21
-        <dependency>
22
-            <groupId>org.springframework.boot</groupId>
23
-            <artifactId>spring-boot-starter-test</artifactId>
24
-            <scope>test</scope>
25
-        </dependency>
26
-        <dependency>
27
-            <groupId>com.jayway.jsonpath</groupId>
28
-            <artifactId>json-path</artifactId>
29
-            <scope>test</scope>
30
-        </dependency>
31
-    </dependencies>
32
-
33
-    <properties>
34
-        <java.version>1.8</java.version>
35
-    </properties>
36
-
37
-
38
-    <build>
39
-        <plugins>
40
-            <plugin>
41
-                <groupId>org.springframework.boot</groupId>
42
-                <artifactId>spring-boot-maven-plugin</artifactId>
43
-            </plugin>
44
-        </plugins>
45
-    </build>
46
-
47
-    <repositories>
48
-        <repository>
49
-            <id>spring-releases</id>
50
-            <url>https://repo.spring.io/libs-release</url>
51
-        </repository>
52
-    </repositories>
53
-    <pluginRepositories>
54
-        <pluginRepository>
55
-            <id>spring-releases</id>
56
-            <url>https://repo.spring.io/libs-release</url>
57
-        </pluginRepository>
58
-    </pluginRepositories>
59
-</project>

+ 0
- 0
initial/src/main/java/hello/.gitignore Vedi File


+ 0
- 33
run-on-pws.json Vedi File

@@ -1,33 +0,0 @@
1
-{
2
-    "orgName": "spring-guides",
3
-    "orgUuid": "",
4
-    "spaces": [
5
-        {
6
-            "name": "spring-guides",
7
-            "routes": [
8
-                {
9
-                    "name": "random1",
10
-                    "value": "${random-word}"
11
-                }
12
-            ],
13
-            "apps": [
14
-                {
15
-                    "name": "rest-service",
16
-                    "code": {
17
-                        "url": "https://springio-guides.s3.amazonaws.com/gs-rest-service-0.1.0.jar",
18
-                        "content_type": "application/war",
19
-                        "actions": [
20
-                            "push"
21
-                        ]
22
-                    },
23
-                    "instances": 1,
24
-                    "memory_in_mb": 1024,
25
-                    "disk_in_mb": 1024,
26
-                    "map_routes": [
27
-                        "random1"
28
-                    ]
29
-                }
30
-            ]
31
-        }
32
-    ]
33
-}

+ 0
- 37
test/run.sh Vedi File

@@ -1,37 +0,0 @@
1
-cd $(dirname $0)
2
-cd ../initial
3
-
4
-mvn clean compile
5
-ret=$?
6
-if [ $ret -ne 0 ]; then
7
-exit $ret
8
-fi
9
-rm -rf target
10
-
11
-./gradlew compileJava
12
-ret=$?
13
-if [ $ret -ne 0 ]; then
14
-exit $ret
15
-fi
16
-rm -rf build
17
-
18
-cd ../complete
19
-mvn clean package
20
-
21
-# if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; 
22
-#   then 
23
-#     curl https://raw.githubusercontent.com/timkay/aws/master/aws -o aws
24
-#     chmod u+x aws
25
-#     ./aws put --progress "x-amz-acl: public-read" springio-guides/gs-rest-service-0.1.0.jar target/gs-rest-service-0.1.0.jar
26
-# fi
27
-
28
-rm -rf target
29
-
30
-./gradlew build
31
-ret=$?
32
-if [ $ret -ne 0 ]; then
33
-exit $ret
34
-fi
35
-
36
-rm -rf build
37
-exit