[wsas-java-dev] svn commit r1917 - in trunk/wsas/java: .
modules/distribution/common/src/assemble
modules/standalone-edition/bin
svn at wso2.org
svn at wso2.org
Fri Apr 20 00:23:23 PDT 2007
Author: saminda
Date: Fri Apr 20 00:23:07 2007
New Revision: 1917
Modified:
trunk/wsas/java/modules/distribution/common/src/assemble/dist-common-assembly.xml
trunk/wsas/java/modules/standalone-edition/bin/shutdown.sh
trunk/wsas/java/modules/standalone-edition/bin/startup.sh
trunk/wsas/java/modules/standalone-edition/bin/wso2wsas.sh
trunk/wsas/java/pom.xml
Log:
Fixing the SNAPSHOT mar deployment
updated the sh to support OS, Mac (Darwin), and Mingw
pretty print pom.xml
Modified: trunk/wsas/java/modules/distribution/common/src/assemble/dist-common-assembly.xml
==============================================================================
--- trunk/wsas/java/modules/distribution/common/src/assemble/dist-common-assembly.xml (original)
+++ trunk/wsas/java/modules/distribution/common/src/assemble/dist-common-assembly.xml Fri Apr 20 00:23:07 2007
@@ -29,39 +29,67 @@
</fileSet>
</fileSets>
<dependencySets>
- <!--<dependencySet>
- <outputDirectory>${dist.temp.assembly.bin.dir}/lib</outputDirectory>
- <excludes>
- <exclude>xerces:xml-apis:jar</exclude>
- <exclude>xerces:xercesImpl:jar</exclude>
- <exclude>xerces:resolver:jar</exclude>
- <exclude>bouncycastle:bcprov-jdk13:jar</exclude>
- <exclude>bouncycastle:bcprov-jdk15:jar</exclude>
- <exclude>org.wso2.mex:wso2mex:mar</exclude>
- <exclude>org.wso2.xfer:wso2xfer:mar</exclude>
- <exclude>org.wso2.statistics:wso2statistics:mar</exclude>
- <exclude>org.wso2.throttle:wso2throttle:mar</exclude>
- <exclude>org.wso2.tracer:wso2tracer:mar</exclude>
- <exclude>org.wso2.codegen:wso2codegen:aar</exclude>
- <exclude>org.apache.axis2:addressing:mar</exclude>
- <exclude>org.apache.axis2:rampart:mar</exclude>
- <exclude>org.apache.axis2:rahas:mar</exclude>
- <exclude>org.apache.sandesha2:sandesha2:mar</exclude>
- <exclude>org.wso2.adminui:wso2adminui:zip</exclude>
- <exclude>org.wso2.adminui:wso2-adminui-graphs-zip:zip</exclude>
- </excludes>
- </dependencySet>-->
+
<dependencySet>
<outputDirectory>temp/wso2wsas-${wso2wsas.version}/repository/modules</outputDirectory>
+ <outputFileNameMapping>${artifactId}-${wso2mex.version}.${extension}</outputFileNameMapping>
<includes>
<include>org.wso2.mex:wso2mex:mar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>temp/wso2wsas-${wso2wsas.version}/repository/modules</outputDirectory>
+ <outputFileNameMapping>${artifactId}-${wso2xfer.version}.${extension}</outputFileNameMapping>
+ <includes>
<include>org.wso2.xfer:wso2xfer:mar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>temp/wso2wsas-${wso2wsas.version}/repository/modules</outputDirectory>
+ <outputFileNameMapping>${artifactId}-${wso2statistics.version}.${extension}</outputFileNameMapping>
+ <includes>
<include>org.wso2.statistics:wso2statistics:mar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>temp/wso2wsas-${wso2wsas.version}/repository/modules</outputDirectory>
+ <outputFileNameMapping>${artifactId}-${wso2throttle.version}.${extension}</outputFileNameMapping>
+ <includes>
<include>org.wso2.throttle:wso2throttle:mar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>temp/wso2wsas-${wso2wsas.version}/repository/modules</outputDirectory>
+ <outputFileNameMapping>${artifactId}-${wso2tracer.version}.${extension}</outputFileNameMapping>
+ <includes>
<include>org.wso2.tracer:wso2tracer:mar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>temp/wso2wsas-${wso2wsas.version}/repository/modules</outputDirectory>
+ <outputFileNameMapping>${artifactId}-${addressing.version}.${extension}</outputFileNameMapping>
+ <includes>
<include>org.apache.axis2:addressing:mar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>temp/wso2wsas-${wso2wsas.version}/repository/modules</outputDirectory>
+ <outputFileNameMapping>${artifactId}-${rampart.version}.${extension}</outputFileNameMapping>
+ <includes>
<include>org.apache.rampart:rampart:mar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>temp/wso2wsas-${wso2wsas.version}/repository/modules</outputDirectory>
+ <outputFileNameMapping>${artifactId}-${rampart.version}.${extension}</outputFileNameMapping>
+ <includes>
<include>org.apache.rampart:rahas:mar</include>
+ </includes>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>temp/wso2wsas-${wso2wsas.version}/repository/modules</outputDirectory>
+ <outputFileNameMapping>${artifactId}-${sandesha2.version}.${extension}</outputFileNameMapping>
+ <includes>
<include>org.apache.sandesha2:sandesha2:mar</include>
</includes>
</dependencySet>
@@ -71,13 +99,6 @@
<include>org.wso2.codegen:wso2codegen:aar</include>
</includes>
</dependencySet>
- <!-- <dependencySet>
- <outputDirectory>lib/endorsed</outputDirectory>
- <includes>
- <include>xerces:xml-apis:jar</include>
- <include>xerces:xercesImpl:jar</include>
- <include>xerces:resolver:jar</include>
- </includes>
- </dependencySet>-->
+
</dependencySets>
</assembly>
\ No newline at end of file
Modified: trunk/wsas/java/modules/standalone-edition/bin/shutdown.sh
==============================================================================
--- trunk/wsas/java/modules/standalone-edition/bin/shutdown.sh (original)
+++ trunk/wsas/java/modules/standalone-edition/bin/shutdown.sh Fri Apr 20 00:23:07 2007
@@ -15,18 +15,27 @@
# 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 WSO2 WSAS."
- exit 1
-fi
-
+DARWIN_TOOLS=""
# OS specific support. $var _must_ be set to either true or false.
-cygwin=false
-os400=false
+cygwin=false;
+darwin=false;
+os400=false;
+mingw=false;
case "`uname`" in
CYGWIN*) cygwin=true;;
+MINGW*) mingw=true;;
OS400*) os400=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
+ DARWIN_TOOLS=$JAVA_HOME/Classes/Classes.jar
+ fi
+ ;;
esac
# resolve links - $0 may be a softlink
@@ -71,13 +80,49 @@
export QIBM_MULTI_THREADED=Y
fi
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$WSO2WSAS_HOME" ] &&
+ WSO2WSAS_HOME="`(cd "$WSO2WSAS_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+ [ -n "$AXIS2_HOME" ] &&
+ WSO2WSAS_HOME="`(cd "$WSO2WSAS_HOME"; pwd)`"
+ # TODO classpath?
+fi
+
+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=java
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly."
+ echo " WSO2 WSAS cannot execute $JAVACMD"
+ exit 1
+fi
+
+# 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 WSO2 WSAS."
+ exit 1
+fi
+
# update classpath
WSO2WSAS_CLASSPATH=""
for f in "$WSO2WSAS_HOME"/lib/*.jar
do
WSO2WSAS_CLASSPATH="$WSO2WSAS_CLASSPATH":$f
done
-WSO2WSAS_CLASSPATH="$JAVA_HOME/lib/tools.jar":"$WSO2WSAS_CLASSPATH":"$CLASSPATH"
+WSO2WSAS_CLASSPATH="$JAVA_HOME/lib/tools.jar":"$WSO2WSAS_CLASSPATH":"$CLASSPATH":"$DARWIN_TOOLS"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
@@ -116,6 +161,7 @@
echo " Using WSO2WSAS_HOME: $WSO2WSAS_HOME"
echo " Using JAVA_HOME: $JAVA_HOME"
-$JAVA_HOME/bin/java -classpath "$WSO2WSAS_CLASSPATH" \
+exec "$JAVACMD" \
+-classpath "$WSO2WSAS_CLASSPATH" \
-Dwso2wsas.home="$WSO2WSAS_HOME" -Daxis2.xml="$WSO2WSAS_HOME/conf/axis2.xml" org.wso2.wsas.Main \
stop
\ No newline at end of file
Modified: trunk/wsas/java/modules/standalone-edition/bin/startup.sh
==============================================================================
--- trunk/wsas/java/modules/standalone-edition/bin/startup.sh (original)
+++ trunk/wsas/java/modules/standalone-edition/bin/startup.sh Fri Apr 20 00:23:07 2007
@@ -15,18 +15,27 @@
# 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 WSO2 WSAS."
- exit 1
-fi
-
+DARWIN_TOOLS=""
# OS specific support. $var _must_ be set to either true or false.
-cygwin=false
-os400=false
+cygwin=false;
+darwin=false;
+os400=false;
+mingw=false;
case "`uname`" in
CYGWIN*) cygwin=true;;
+MINGW*) mingw=true;;
OS400*) os400=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
+ DARWIN_TOOLS=$JAVA_HOME/Classes/Classes.jar
+ fi
+ ;;
esac
# resolve links - $0 may be a softlink
@@ -71,13 +80,49 @@
export QIBM_MULTI_THREADED=Y
fi
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$WSO2WSAS_HOME" ] &&
+ WSO2WSAS_HOME="`(cd "$WSO2WSAS_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+ [ -n "$AXIS2_HOME" ] &&
+ WSO2WSAS_HOME="`(cd "$WSO2WSAS_HOME"; pwd)`"
+ # TODO classpath?
+fi
+
+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=java
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly."
+ echo " WSO2 WSAS cannot execute $JAVACMD"
+ exit 1
+fi
+
+# 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 WSO2 WSAS."
+ exit 1
+fi
+
# update classpath
WSO2WSAS_CLASSPATH=""
for f in "$WSO2WSAS_HOME"/lib/*.jar
do
WSO2WSAS_CLASSPATH="$WSO2WSAS_CLASSPATH":$f
done
-WSO2WSAS_CLASSPATH="$JAVA_HOME/lib/tools.jar":"$WSO2WSAS_CLASSPATH":"$CLASSPATH"
+WSO2WSAS_CLASSPATH="$JAVA_HOME/lib/tools.jar":"$WSO2WSAS_CLASSPATH":"$CLASSPATH":"$DARWIN_TOOLS"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
@@ -119,7 +164,8 @@
echo " Start signal posted to WSO2 WSAS."
echo " Please check the server's log file for startup status."
-$JAVA_HOME/bin/java -classpath "$WSO2WSAS_CLASSPATH" \
+exec "$JAVACMD" \
$JAVA_OPTS \
+-classpath "$WSO2WSAS_CLASSPATH" \
-Dwso2wsas.home="$WSO2WSAS_HOME" -Daxis2.xml="$WSO2WSAS_HOME/conf/axis2.xml" org.wso2.wsas.Main \
start >> "$WSO2WSAS_HOME"/logs/wsas.out 2>&1 &
Modified: trunk/wsas/java/modules/standalone-edition/bin/wso2wsas.sh
==============================================================================
--- trunk/wsas/java/modules/standalone-edition/bin/wso2wsas.sh (original)
+++ trunk/wsas/java/modules/standalone-edition/bin/wso2wsas.sh Fri Apr 20 00:23:07 2007
@@ -30,18 +30,27 @@
# 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 WSO2 WSAS."
- exit 1
-fi
-
+DARWIN_TOOLS=""
# OS specific support. $var _must_ be set to either true or false.
-cygwin=false
-os400=false
+cygwin=false;
+darwin=false;
+os400=false;
+mingw=false;
case "`uname`" in
CYGWIN*) cygwin=true;;
+MINGW*) mingw=true;;
OS400*) os400=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
+ DARWIN_TOOLS=$JAVA_HOME/Classes/Classes.jar
+ fi
+ ;;
esac
# resolve links - $0 may be a softlink
@@ -86,13 +95,50 @@
export QIBM_MULTI_THREADED=Y
fi
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$WSO2WSAS_HOME" ] &&
+ WSO2WSAS_HOME="`(cd "$WSO2WSAS_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+ [ -n "$AXIS2_HOME" ] &&
+ WSO2WSAS_HOME="`(cd "$WSO2WSAS_HOME"; pwd)`"
+ # TODO classpath?
+fi
+
+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=java
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly."
+ echo " WSO2 WSAS cannot execute $JAVACMD"
+ exit 1
+fi
+
+# 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 WSO2 WSAS."
+ exit 1
+fi
+
+
# update classpath
WSO2WSAS_CLASSPATH=""
for f in "$WSO2WSAS_HOME"/lib/*.jar
do
WSO2WSAS_CLASSPATH="$WSO2WSAS_CLASSPATH":$f
done
-WSO2WSAS_CLASSPATH="$JAVA_HOME/lib/tools.jar":"$WSO2WSAS_CLASSPATH":"$CLASSPATH"
+WSO2WSAS_CLASSPATH="$JAVA_HOME/lib/tools.jar":"$WSO2WSAS_CLASSPATH":"$CLASSPATH":"$DARWIN_TOOLS"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
@@ -169,8 +215,9 @@
echo " Using WSO2WSAS_HOME: $WSO2WSAS_HOME"
echo " Using JAVA_HOME: $JAVA_HOME"
-$JAVA_HOME/bin/java -classpath "$WSO2WSAS_CLASSPATH" \
+exec "$JAVACMD" \
$JAVA_OPTS \
+-classpath "$WSO2WSAS_CLASSPATH" \
-Djava.endorsed.dirs="$WSO2WSAS_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
-Dwso2wsas.home="$WSO2WSAS_HOME" -Dwso2wsas.server.xml="$WSO2WSAS_HOME/conf/server.xml" org.wso2.wsas.Main \
$CMD
\ No newline at end of file
Modified: trunk/wsas/java/pom.xml
==============================================================================
--- trunk/wsas/java/pom.xml (original)
+++ trunk/wsas/java/pom.xml Fri Apr 20 00:23:07 2007
@@ -1236,17 +1236,17 @@
</plugins>
</build>
</profile>
- <profile>
- <id>macProfile</id>
- <properties>
- <toolsjar>${java.home}/../Classes/classes.jar</toolsjar>
- </properties>
- <activation>
- <os>
- <family>mac</family>
- </os>
- </activation>
- </profile>
+ <profile>
+ <id>macProfile</id>
+ <properties>
+ <toolsjar>${java.home}/../Classes/classes.jar</toolsjar>
+ </properties>
+ <activation>
+ <os>
+ <family>mac</family>
+ </os>
+ </activation>
+ </profile>
</profiles>
@@ -1370,7 +1370,7 @@
<slf4j.version>1.0.1</slf4j.version>
<spring.version>1.2.8</spring.version>
- <toolsjar>${java.home}/../lib/tools.jar</toolsjar>
+ <toolsjar>${java.home}/../lib/tools.jar</toolsjar>
<mx4j.version>3.0.1</mx4j.version>
</properties>
More information about the Wsas-java-dev
mailing list