a spring boot ionic simple app

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