Advertisement
Exupery

maven aa generated script

Mar 5th, 2013
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 6.64 KB | None | 0 0
  1. #!/bin/sh
  2. # ----------------------------------------------------------------------------
  3. #  Copyright 2001-2006 The Apache Software Foundation.
  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. # ----------------------------------------------------------------------------
  17. #
  18. #   Copyright (c) 2001-2006 The Apache Software Foundation.  All rights
  19. #   reserved.
  20.  
  21.  
  22. # resolve links - $0 may be a softlink
  23. PRG="$0"
  24.  
  25. while [ -h "$PRG" ]; do
  26.   ls=`ls -ld "$PRG"`
  27.   link=`expr "$ls" : '.*-> \(.*\)$'`
  28.   if expr "$link" : '/.*' > /dev/null; then
  29.     PRG="$link"
  30.   else
  31.     PRG=`dirname "$PRG"`/"$link"
  32.   fi
  33. done
  34.  
  35. PRGDIR=`dirname "$PRG"`
  36. BASEDIR=`cd "$PRGDIR/.." >/dev/null; pwd`
  37.  
  38.  
  39.  
  40. # OS specific support.  $var _must_ be set to either true or false.
  41. cygwin=false;
  42. darwin=false;
  43. case "`uname`" in
  44.   CYGWIN*) cygwin=true ;;
  45.   Darwin*) darwin=true
  46.            if [ -z "$JAVA_VERSION" ] ; then
  47.              JAVA_VERSION="CurrentJDK"
  48.            else
  49.              echo "Using Java version: $JAVA_VERSION"
  50.            fi
  51.            if [ -z "$JAVA_HOME" ] ; then
  52.              JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
  53.            fi
  54.            ;;
  55. esac
  56.  
  57. if [ -z "$JAVA_HOME" ] ; then
  58.   if [ -r /etc/gentoo-release ] ; then
  59.     JAVA_HOME=`java-config --jre-home`
  60.   fi
  61. fi
  62.  
  63. # For Cygwin, ensure paths are in UNIX format before anything is touched
  64. if $cygwin ; then
  65.   [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  66.   [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
  67. fi
  68.  
  69. # If a specific java binary isn't specified search for the standard 'java' binary
  70. if [ -z "$JAVACMD" ] ; then
  71.   if [ -n "$JAVA_HOME"  ] ; then
  72.     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
  73.       # IBM's JDK on AIX uses strange locations for the executables
  74.       JAVACMD="$JAVA_HOME/jre/sh/java"
  75.     else
  76.       JAVACMD="$JAVA_HOME/bin/java"
  77.     fi
  78.   else
  79.     JAVACMD=`which java`
  80.   fi
  81. fi
  82.  
  83. if [ ! -x "$JAVACMD" ] ; then
  84.   echo "Error: JAVA_HOME is not defined correctly." 1>&2
  85.   echo "  We cannot execute $JAVACMD" 1>&2
  86.   exit 1
  87. fi
  88.  
  89. if [ -z "$REPO" ]
  90. then
  91.   REPO="$BASEDIR"/repo
  92. fi
  93.  
  94. 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
  95.  
  96. # For Cygwin, switch paths to Windows format before running java
  97. if $cygwin; then
  98.   [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
  99.   [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
  100.   [ -n "$HOME" ] && HOME=`cygpath --path --windows "$HOME"`
  101.   [ -n "$BASEDIR" ] && BASEDIR=`cygpath --path --windows "$BASEDIR"`
  102.   [ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"`
  103. fi
  104.  
  105. exec "$JAVACMD" $JAVA_OPTS  \
  106.   -classpath "$CLASSPATH" \
  107.   -Dapp.name="webapp" \
  108.   -Dapp.pid="$$" \
  109.   -Dapp.repo="$REPO" \
  110.   -Dapp.home="$BASEDIR" \
  111.   -Dbasedir="$BASEDIR" \
  112.   org.stopbadware.dsp.Main \
  113.   "$@"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement