Author: ruwan Date: Sat Jun 6 16:26:02 2009 New Revision: 37990 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=37990
Log: Adding a sample execution scripot Added: trunk/esb/java/modules/samples/src/main/scripts/wso2esb-samples.bat trunk/esb/java/modules/samples/src/main/scripts/wso2esb-samples.sh Modified: trunk/esb/java/modules/distribution/src/main/assembly/bin.xml Modified: trunk/esb/java/modules/distribution/src/main/assembly/bin.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/distribution/src/main/assembly/bin.xml?rev=37990&r1=37989&r2=37990&view=diff ============================================================================== --- trunk/esb/java/modules/distribution/src/main/assembly/bin.xml (original) +++ trunk/esb/java/modules/distribution/src/main/assembly/bin.xml Sat Jun 6 16:26:02 2009 @@ -59,6 +59,21 @@ </fileSet> <fileSet> <directory>../../modules/samples/src/main/scripts</directory> + <outputDirectory>wso2esb-${pom.version}/bin</outputDirectory> + <includes> + <include>wso2esb-samples.sh</include> + </includes> + <fileMode>755</fileMode> + </fileSet> + <fileSet> + <directory>../../modules/samples/src/main/scripts</directory> + <outputDirectory>wso2esb-${pom.version}/bin</outputDirectory> + <includes> + <include>wso2esb-samples.bat</include> + </includes> + </fileSet> + <fileSet> + <directory>../../modules/samples/src/main/scripts</directory> <outputDirectory>wso2esb-${pom.version}/samples/axis2Server</outputDirectory> <includes> <include>axis2server.sh</include> Added: trunk/esb/java/modules/samples/src/main/scripts/wso2esb-samples.bat URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/scripts/wso2esb-samples.bat?pathrev=37990 ============================================================================== Added: trunk/esb/java/modules/samples/src/main/scripts/wso2esb-samples.sh URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/scripts/wso2esb-samples.sh?pathrev=37990 ============================================================================== --- (empty file) +++ trunk/esb/java/modules/samples/src/main/scripts/wso2esb-samples.sh Sat Jun 6 16:26:02 2009 @@ -0,0 +1,80 @@ +#!/bin/sh + +# Copyright 2001,2004-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. + +# ---------------------------------------------------------------------------- +# Script for runnig the WSO2 ESB Server samples +# +# Environment Variable Prequisites +# +# CARBON_HOME Home of WSO2 Carbon installation. If not set I will try +# to figure it out. +# +# JAVA_HOME Must point at your Java Development Kit installation. +# +# JAVA_OPTS (Optional) Java runtime options used when the commands +# is executed. +# +# NOTE: Borrowed generously from Apache Tomcat startup scripts. +# ----------------------------------------------------------------------------- + +# 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 + +# Get standard environment variables +PRGDIR=`dirname "$PRG"` + +# ----- Process the input command ---------------------------------------------- +CMD="" +SAMPLE="" +VALIDATE="" +for c in $* +do + if [ "$c" = "-sn" ] || [ "$c" = "sn" ]; then + SAMPLE="t" + VALIDATE="t" + continue + elif [ "$SAMPLE" = "t" ]; then + NODIGITS="$(echo $c | sed 's/[[:digit:]]//g')" + if [ -z $NODIGITS ]; then + SAMPLE="" + CMD="$CMD -Desb.sample=$c -Dcarbon.registry.root=/esb-samples/s$c" + else + echo "*** Specified sample number is not a number *** Please specify a valid sample number with the -sn option" + echo "Example, to run sample 0: wso2esb-samples.sh -sn 0" + exit + fi + else + CMD="$CMD $c" + fi +done + +if [ -z $VALIDATE ]; then + echo "*** Sample number to be started is not specified *** Please specify a sample number to be started with the -sn option" + echo "Example, to run sample 0: wso2esb-samples.sh -sn 0" + exit +fi + +sh $PRGDIR/wso2server.sh$CMD \ No newline at end of file _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
