Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # ----------------------------------------------------------------------------
- # Copyright 2001-2006 The Apache Software Foundation.
- #
- # 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.
- # ----------------------------------------------------------------------------
- #
- # Copyright (c) 2001-2006 The Apache Software Foundation. All rights
- # reserved.
- # resolve links - $0 may be a softlink
- PRG="$0"
- while [ -h "$PRG" ]; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`/"$link"
- fi
- done
- PRGDIR=`dirname "$PRG"`
- BASEDIR=`cd "$PRGDIR/.." >/dev/null; pwd`
- # OS specific support. $var _must_ be set to either true or false.
- cygwin=false;
- darwin=false;
- case "`uname`" in
- CYGWIN*) cygwin=true ;;
- Darwin*) darwin=true
- if [ -z "$JAVA_VERSION" ] ; then
- JAVA_VERSION="CurrentJDK"
- else
- echo "Using Java version: $JAVA_VERSION"
- fi
- if [ -z "$JAVA_HOME" ] ; then
- JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
- fi
- ;;
- esac
- if [ -z "$JAVA_HOME" ] ; then
- if [ -r /etc/gentoo-release ] ; then
- JAVA_HOME=`java-config --jre-home`
- fi
- fi
- # For Cygwin, ensure paths are in UNIX format before anything is touched
- if $cygwin ; then
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
- fi
- # If a specific java binary isn't specified search for the standard 'java' binary
- if [ -z "$JAVACMD" ] ; then
- if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- else
- JAVACMD=`which java`
- fi
- fi
- if [ ! -x "$JAVACMD" ] ; then
- echo "Error: JAVA_HOME is not defined correctly." 1>&2
- echo " We cannot execute $JAVACMD" 1>&2
- exit 1
- fi
- if [ -z "$REPO" ]
- then
- REPO="$BASEDIR"/repo
- fi
- CLASSPATH=$CLASSPATH_PREFIX:"$BASEDIR"/etc:"$REPO"/ch/qos/logback/logback-classic/1.0.9/logback-classic-1.0.9.jar:"$REPO"/ch/qos/logback/logback-core/1.0.9/logback-core-1.0.9.jar:"$REPO"/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar:"$REPO"/com/sun/jersey/jersey-server/1.16/jersey-server-1.16.jar:"$REPO"/asm/asm/3.1/asm-3.1.jar:"$REPO"/com/sun/jersey/jersey-core/1.16/jersey-core-1.16.jar:"$REPO"/com/sun/jersey/jersey-servlet/1.16/jersey-servlet-1.16.jar:"$REPO"/com/sun/jersey/jersey-json/1.16/jersey-json-1.16.jar:"$REPO"/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar:"$REPO"/com/sun/xml/bind/jaxb-impl/2.2.3-1/jaxb-impl-2.2.3-1.jar:"$REPO"/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar:"$REPO"/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar:"$REPO"/javax/activation/activation/1.1/activation-1.1.jar:"$REPO"/org/codehaus/jackson/jackson-core-asl/1.9.2/jackson-core-asl-1.9.2.jar:"$REPO"/org/codehaus/jackson/jackson-mapper-asl/1.9.2/jackson-mapper-asl-1.9.2.jar:"$REPO"/org/codehaus/jackson/jackson-jaxrs/1.9.2/jackson-jaxrs-1.9.2.jar:"$REPO"/org/codehaus/jackson/jackson-xc/1.9.2/jackson-xc-1.9.2.jar:"$REPO"/org/mongodb/mongo-java-driver/2.10.1/mongo-java-driver-2.10.1.jar:"$REPO"/org/apache/shiro/shiro-web/1.2.1/shiro-web-1.2.1.jar:"$REPO"/org/apache/shiro/shiro-core/1.2.1/shiro-core-1.2.1.jar:"$REPO"/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar:"$REPO"/org/jasypt/jasypt/1.9.0/jasypt-1.9.0.jar:"$REPO"/org/stopbadware/sbwjavalib/1.0/sbwjavalib-1.0.jar:"$REPO"/org/codehaus/mojo/appassembler-maven-plugin/1.3/appassembler-maven-plugin-1.3.jar:"$REPO"/org/codehaus/mojo/appassembler/appassembler-model/1.3/appassembler-model-1.3.jar:"$REPO"/net/java/dev/stax-utils/stax-utils/20060502/stax-utils-20060502.jar:"$REPO"/stax/stax/1.1.1-dev/stax-1.1.1-dev.jar:"$REPO"/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar:"$REPO"/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.jar:"$REPO"/org/apache/maven/maven-project/2.0.10/maven-project-2.0.10.jar:"$REPO"/org/apache/maven/maven-settings/2.0.10/maven-settings-2.0.10.jar:"$REPO"/org/apache/maven/maven-profile/2.0.10/maven-profile-2.0.10.jar:"$REPO"/org/apache/maven/maven-model/2.0.10/maven-model-2.0.10.jar:"$REPO"/org/apache/maven/maven-artifact-manager/2.0.10/maven-artifact-manager-2.0.10.jar:"$REPO"/org/apache/maven/maven-repository-metadata/2.0.10/maven-repository-metadata-2.0.10.jar:"$REPO"/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2.jar:"$REPO"/org/apache/maven/maven-plugin-registry/2.0.10/maven-plugin-registry-2.0.10.jar:"$REPO"/org/codehaus/plexus/plexus-interpolation/1.1/plexus-interpolation-1.1.jar:"$REPO"/org/apache/maven/maven-artifact/2.0.10/maven-artifact-2.0.10.jar:"$REPO"/stax/stax-api/1.0.1/stax-api-1.0.1.jar:"$REPO"/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.jar:"$REPO"/junit/junit/3.8.1/junit-3.8.1.jar:"$REPO"/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar:"$REPO"/org/apache/tomcat/embed/tomcat-embed-core/7.0.37/tomcat-embed-core-7.0.37.jar:"$REPO"/org/apache/tomcat/embed/tomcat-embed-logging-juli/7.0.37/tomcat-embed-logging-juli-7.0.37.jar:"$REPO"/org/apache/tomcat/embed/tomcat-embed-jasper/7.0.37/tomcat-embed-jasper-7.0.37.jar:"$REPO"/org/eclipse/jdt/core/compiler/ecj/4.2.1/ecj-4.2.1.jar:"$REPO"/org/stopbadware/clearinghouse/0.0.1/clearinghouse-0.0.1.pom
- # For Cygwin, switch paths to Windows format before running java
- if $cygwin; then
- [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- [ -n "$HOME" ] && HOME=`cygpath --path --windows "$HOME"`
- [ -n "$BASEDIR" ] && BASEDIR=`cygpath --path --windows "$BASEDIR"`
- [ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"`
- fi
- exec "$JAVACMD" $JAVA_OPTS \
- -classpath "$CLASSPATH" \
- -Dapp.name="webapp" \
- -Dapp.pid="$$" \
- -Dapp.repo="$REPO" \
- -Dapp.home="$BASEDIR" \
- -Dbasedir="$BASEDIR" \
- org.stopbadware.dsp.Main \
- "$@"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement