axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r470672 - in /webservices/axis2/branches/java/1_1/modules/tool/script: axis2.sh setenv.sh
Date Fri, 03 Nov 2006 05:03:31 GMT
Author: chinthaka
Date: Thu Nov  2 21:03:31 2006
New Revision: 470672

URL: http://svn.apache.org/viewvc?view=rev&rev=470672
Log:
Now the figuring out of AXIS2_HOME and JAVA_HOME is eveywhere. Putting that to a new script
(setenv.sh) and calling it from everywhere. 
Need to do the same for windows as well.

Added:
    webservices/axis2/branches/java/1_1/modules/tool/script/setenv.sh
Modified:
    webservices/axis2/branches/java/1_1/modules/tool/script/axis2.sh

Modified: webservices/axis2/branches/java/1_1/modules/tool/script/axis2.sh
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/script/axis2.sh?view=diff&rev=470672&r1=470671&r2=470672
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/script/axis2.sh (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/script/axis2.sh Thu Nov  2 21:03:31 2006
@@ -15,92 +15,21 @@
 #  limitations under the License.
 
 # ----------------------------------------------------------------------------
-# Axis2 Script
+#    Axis2 Script
 #
-# Environment Variable Prequisites
+# Pre-requisites
+#   - setenv.sh must have been called.
 #
 #   AXIS2_HOME   Home of Axis2 installation. If not set I will  try
 #                   to figure it out.
 #
 #   JAVA_HOME       Must point at your Java Development Kit installation.
 #
-# NOTE: Borrowed generously from Apache Tomcat startup scripts.
 # -----------------------------------------------------------------------------
 
-# if JAVA_HOME is not set we're not happy
-if [ -z "$JAVA_HOME" ]; then
-  echo "You must set the JAVA_HOME variable before running Axis2 Script."
-  exit 1
-fi
+# Get the cnotext and from that find the location of setenv.sh
+`dirname $0`/setenv.sh
 
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-os400=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-OS400*) os400=true;;
-esac
-
-# 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"`
-
-# Only set AXIS2_HOME if not already set
-[ -z "$AXIS2_HOME" ] && AXIS2_HOME=`cd "$PRGDIR/.." ; pwd`
-
-# 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 "$AXIS2_HOME" ] && AXIS2_HOME=`cygpath --unix "$AXIS2_HOME"`
-  [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
-# For OS400
-if $os400; then
-  # Set job priority to standard for interactive (interactive - 6) by using
-  # the interactive priority - 6, the helper threads that respond to requests
-  # will be running at the same priority as interactive jobs.
-  COMMAND='chgjob job('$JOBNAME') runpty(6)'
-  system $COMMAND
-
-  # Enable multi threading
-  export QIBM_MULTI_THREADED=Y
-fi
-
-# update classpath
-AXIS2_CLASSPATH=""
-for f in "$AXIS2_HOME"/lib/*.jar
-do
-  AXIS2_CLASSPATH="$AXIS2_CLASSPATH":$f
-done
-AXIS2_CLASSPATH="$JAVA_HOME/lib/tools.jar":"$AXIS2_CLASSPATH":"$CLASSPATH"
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
-  JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
-  AXIS2_HOME=`cygpath --absolute --windows "$AXIS2_HOME"`
-  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
-  JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
-fi
-
-# ----- Execute The Requested Command -----------------------------------------
-
-cd "$AXIS2_HOME"
-echo " Using AXIS2_HOME:   $AXIS2_HOME"
-echo " Using JAVA_HOME:       $JAVA_HOME"
 
 $JAVA_HOME/bin/java -classpath "$AXIS2_CLASSPATH" \
--Daxis2.xml="$AXIS2_HOME/conf/axis2.xml" -Daxis2.repo="$AXIS2_HOME/repository" $*
-
+-Daxis2.xml="$AXIS2_HOME/conf/axis2.xml" -Daxis2.repo="$AXIS2_HOME/repository" $*
\ No newline at end of file

Added: webservices/axis2/branches/java/1_1/modules/tool/script/setenv.sh
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/script/setenv.sh?view=auto&rev=470672
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/script/setenv.sh (added)
+++ webservices/axis2/branches/java/1_1/modules/tool/script/setenv.sh Thu Nov  2 21:03:31
2006
@@ -0,0 +1,107 @@
+#!/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.
+
+# ----------------------------------------------------------------------------
+#  Set Environment Shell Script
+#
+#  This will set AXIS2_HOME and JAVA_HOME environment variables properly.
+#
+#   AXIS2_HOME   Home of Axis2 installation. If not set I will  try
+#                   to figure it out.
+#
+#   JAVA_HOME       Must point at your Java Development Kit installation.
+#
+# NOTE: Borrowed generously from Apache Tomcat startup scripts.
+# -----------------------------------------------------------------------------
+
+# if JAVA_HOME is not set we're not happy
+if [ -z "$JAVA_HOME" ]; then
+  echo "You must set the JAVA_HOME variable before running Axis2 Script."
+  exit 1
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false
+os400=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+OS400*) os400=true;;
+esac
+
+# 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"`
+
+# Only set AXIS2_HOME if not already set
+[ -z "$AXIS2_HOME" ] && AXIS2_HOME=`cd "$PRGDIR/.." ; pwd`
+
+# 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 "$AXIS2_HOME" ] && AXIS2_HOME=`cygpath --unix "$AXIS2_HOME"`
+  [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For OS400
+if $os400; then
+  # Set job priority to standard for interactive (interactive - 6) by using
+  # the interactive priority - 6, the helper threads that respond to requests
+  # will be running at the same priority as interactive jobs.
+  COMMAND='chgjob job('$JOBNAME') runpty(6)'
+  system $COMMAND
+
+  # Enable multi threading
+  export QIBM_MULTI_THREADED=Y
+fi
+
+# update classpath
+AXIS2_CLASSPATH=""
+for f in "$AXIS2_HOME"/lib/*.jar
+do
+  AXIS2_CLASSPATH="$AXIS2_CLASSPATH":$f
+done
+AXIS2_CLASSPATH="$JAVA_HOME/lib/tools.jar":"$AXIS2_CLASSPATH":"$CLASSPATH"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
+  AXIS2_HOME=`cygpath --absolute --windows "$AXIS2_HOME"`
+  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
+fi
+
+export AXIS2_HOME=$AXIS2_HOME
+export JAVA_HOME=$JAVA_HOME
+export AXIS2_CLASSPATH=$AXIS2_CLASSPATH
+
+
+echo " Using AXIS2_HOME:   $AXIS2_HOME"
+echo " Using JAVA_HOME:       $JAVA_HOME"
+
+
+



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message