added svcapi ui and camunda code
[it/otf.git] / otf-camunda / mvnw
diff --git a/otf-camunda/mvnw b/otf-camunda/mvnw
new file mode 100644 (file)
index 0000000..7778d42
--- /dev/null
@@ -0,0 +1,225 @@
+#!/bin/sh\r
+# ----------------------------------------------------------------------------\r
+# Licensed to the Apache Software Foundation (ASF) under one\r
+# or more contributor license agreements.  See the NOTICE file\r
+# distributed with this work for additional information\r
+# regarding copyright ownership.  The ASF licenses this file\r
+# to you under the Apache License, Version 2.0 (the\r
+# "License"); you may not use this file except in compliance\r
+# with the License.  You may obtain a copy of the License at\r
+#\r
+#    http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing,\r
+# software distributed under the License is distributed on an\r
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r
+# KIND, either express or implied.  See the License for the\r
+# specific language governing permissions and limitations\r
+# under the License.\r
+# ----------------------------------------------------------------------------\r
+\r
+# ----------------------------------------------------------------------------\r
+# Maven2 Start Up Batch script\r
+#\r
+# Required ENV vars:\r
+# ------------------\r
+#   JAVA_HOME - location of a JDK home dir\r
+#\r
+# Optional ENV vars\r
+# -----------------\r
+#   M2_HOME - location of maven2's installed home dir\r
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven\r
+#     e.g. to debug Maven itself, use\r
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000\r
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files\r
+# ----------------------------------------------------------------------------\r
+\r
+if [ -z "$MAVEN_SKIP_RC" ] ; then\r
+\r
+  if [ -f /etc/mavenrc ] ; then\r
+    . /etc/mavenrc\r
+  fi\r
+\r
+  if [ -f "$HOME/.mavenrc" ] ; then\r
+    . "$HOME/.mavenrc"\r
+  fi\r
+\r
+fi\r
+\r
+# OS specific support.  $var _must_ be set to either true or false.\r
+cygwin=false;\r
+darwin=false;\r
+mingw=false\r
+case "`uname`" in\r
+  CYGWIN*) cygwin=true ;;\r
+  MINGW*) mingw=true;;\r
+  Darwin*) darwin=true\r
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home\r
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html\r
+    if [ -z "$JAVA_HOME" ]; then\r
+      if [ -x "/usr/libexec/java_home" ]; then\r
+        export JAVA_HOME="`/usr/libexec/java_home`"\r
+      else\r
+        export JAVA_HOME="/Library/Java/Home"\r
+      fi\r
+    fi\r
+    ;;\r
+esac\r
+\r
+if [ -z "$JAVA_HOME" ] ; then\r
+  if [ -r /etc/gentoo-release ] ; then\r
+    JAVA_HOME=`java-config --jre-home`\r
+  fi\r
+fi\r
+\r
+if [ -z "$M2_HOME" ] ; then\r
+  ## resolve links - $0 may be a link to maven's home\r
+  PRG="$0"\r
+\r
+  # need this for relative symlinks\r
+  while [ -h "$PRG" ] ; do\r
+    ls=`ls -ld "$PRG"`\r
+    link=`expr "$ls" : '.*-> \(.*\)$'`\r
+    if expr "$link" : '/.*' > /dev/null; then\r
+      PRG="$link"\r
+    else\r
+      PRG="`dirname "$PRG"`/$link"\r
+    fi\r
+  done\r
+\r
+  saveddir=`pwd`\r
+\r
+  M2_HOME=`dirname "$PRG"`/..\r
+\r
+  # make it fully qualified\r
+  M2_HOME=`cd "$M2_HOME" && pwd`\r
+\r
+  cd "$saveddir"\r
+  # echo Using m2 at $M2_HOME\r
+fi\r
+\r
+# For Cygwin, ensure paths are in UNIX format before anything is touched\r
+if $cygwin ; then\r
+  [ -n "$M2_HOME" ] &&\r
+    M2_HOME=`cygpath --unix "$M2_HOME"`\r
+  [ -n "$JAVA_HOME" ] &&\r
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`\r
+  [ -n "$CLASSPATH" ] &&\r
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`\r
+fi\r
+\r
+# For Migwn, ensure paths are in UNIX format before anything is touched\r
+if $mingw ; then\r
+  [ -n "$M2_HOME" ] &&\r
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"\r
+  [ -n "$JAVA_HOME" ] &&\r
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"\r
+  # TODO classpath?\r
+fi\r
+\r
+if [ -z "$JAVA_HOME" ]; then\r
+  javaExecutable="`which javac`"\r
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then\r
+    # readlink(1) is not available as standard on Solaris 10.\r
+    readLink=`which readlink`\r
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then\r
+      if $darwin ; then\r
+        javaHome="`dirname \"$javaExecutable\"`"\r
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"\r
+      else\r
+        javaExecutable="`readlink -f \"$javaExecutable\"`"\r
+      fi\r
+      javaHome="`dirname \"$javaExecutable\"`"\r
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`\r
+      JAVA_HOME="$javaHome"\r
+      export JAVA_HOME\r
+    fi\r
+  fi\r
+fi\r
+\r
+if [ -z "$JAVACMD" ] ; then\r
+  if [ -n "$JAVA_HOME"  ] ; then\r
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then\r
+      # IBM's JDK on AIX uses strange locations for the executables\r
+      JAVACMD="$JAVA_HOME/jre/sh/java"\r
+    else\r
+      JAVACMD="$JAVA_HOME/bin/java"\r
+    fi\r
+  else\r
+    JAVACMD="`which java`"\r
+  fi\r
+fi\r
+\r
+if [ ! -x "$JAVACMD" ] ; then\r
+  echo "Error: JAVA_HOME is not defined correctly." >&2\r
+  echo "  We cannot execute $JAVACMD" >&2\r
+  exit 1\r
+fi\r
+\r
+if [ -z "$JAVA_HOME" ] ; then\r
+  echo "Warning: JAVA_HOME environment variable is not set."\r
+fi\r
+\r
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher\r
+\r
+# traverses directory structure from process work directory to filesystem root\r
+# first directory with .mvn subdirectory is considered project base directory\r
+find_maven_basedir() {\r
+\r
+  if [ -z "$1" ]\r
+  then\r
+    echo "Path not specified to find_maven_basedir"\r
+    return 1\r
+  fi\r
+\r
+  basedir="$1"\r
+  wdir="$1"\r
+  while [ "$wdir" != '/' ] ; do\r
+    if [ -d "$wdir"/.mvn ] ; then\r
+      basedir=$wdir\r
+      break\r
+    fi\r
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)\r
+    if [ -d "${wdir}" ]; then\r
+      wdir=`cd "$wdir/.."; pwd`\r
+    fi\r
+    # end of workaround\r
+  done\r
+  echo "${basedir}"\r
+}\r
+\r
+# concatenates all lines of a file\r
+concat_lines() {\r
+  if [ -f "$1" ]; then\r
+    echo "$(tr -s '\n' ' ' < "$1")"\r
+  fi\r
+}\r
+\r
+BASE_DIR=`find_maven_basedir "$(pwd)"`\r
+if [ -z "$BASE_DIR" ]; then\r
+  exit 1;\r
+fi\r
+\r
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}\r
+echo $MAVEN_PROJECTBASEDIR\r
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"\r
+\r
+# For Cygwin, switch paths to Windows format before running java\r
+if $cygwin; then\r
+  [ -n "$M2_HOME" ] &&\r
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`\r
+  [ -n "$JAVA_HOME" ] &&\r
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`\r
+  [ -n "$CLASSPATH" ] &&\r
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`\r
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&\r
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`\r
+fi\r
+\r
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain\r
+\r
+exec "$JAVACMD" \\r
+  $MAVEN_OPTS \\r
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \\r
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \\r
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"\r