Author: ema
Date: Tue Jul 24 01:42:53 2007
New Revision: 558961
URL: http://svn.apache.org/viewvc?view=rev&rev=558961
Log:
[CXF-809] Applied Benson's improved version java2wsdl script to support cygwin,
also updated other wsdl2* script.
Modified:
incubator/cxf/trunk/distribution/src/main/release/bin/java2wsdl
incubator/cxf/trunk/distribution/src/main/release/bin/mc
incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2java
incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2service
incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2soap
incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2xml
incubator/cxf/trunk/distribution/src/main/release/bin/wsdlvalidator
incubator/cxf/trunk/distribution/src/main/release/bin/xsd2wsdl
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/java2wsdl
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/java2wsdl?view=diff&rev=558961&r1=558960&r2=558961
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/java2wsdl (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/java2wsdl Tue Jul 24
01:42:53 2007
@@ -22,6 +22,19 @@
# run the CXF java2wsdl tool
#
+# Check for irritating 'operating systems'.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ Darwin*) darwin=true
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+ fi
+ ;;
+esac
+
+
me=`basename $0`
cxf_home=$CXF_HOME
if [ ! -f $cxf_home/lib/cxf-manifest-incubator.jar ]; then
@@ -46,7 +59,7 @@
#
sun_tool_path=""
-if [ ! `uname` = 'Darwin' ]; then
+if [ $darwin == false ]; then
sun_tool_path=${JAVA_HOME}/lib/tools.jar
if [ ! -f $sun_tool_path ]; then
echo "ERROR: Set JAVA_HOME to the path where the J2SE 5.0 (JDK5.0) is
installed"
@@ -56,5 +69,28 @@
log_config=$cxf_home/etc/logging.properties
-cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+
+# For Cygwin, switch paths to appropriate format before running java
+# For PATHs convert to unix format first, then to windows format to ensure
+# both formats are supported. Probably this will fail on directories with ;
+# in the name in the path. Let's assume that paths containing ; are more
+# rare than windows style paths on cygwin.
+if $cygwin; then
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ cxf_classpath=`cygpath --$format "${cxf_jar}"`
+ if [ ! -z "${CLASSPATH}" ]; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format --path "${CLASSPATH}"`
+ fi
+ if [ ! -z "${sun_tool_path}" ] ; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format "${sun_tool_path}"`
+ fi
+ log_config=`cygpath --$format "$log_config"`
+else
+ cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+fi
+
$JAVA_HOME/bin/java -cp ${cxf_classpath}
-Djava.util.logging.config.file=$log_config
org.apache.cxf.tools.java2wsdl.JavaToWSDL "$@"
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/mc
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/mc?view=diff&rev=558961&r1=558960&r2=558961
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/mc (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/mc Tue Jul 24
01:42:53 2007
@@ -21,8 +21,20 @@
#!/bin/sh
# run the Apache CXF management console tool
#
+# Check for irritating 'operating systems'.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ Darwin*) darwin=true
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+ fi
+ ;;
+esac
me=`basename $0`
+
cxf_home=$CXF_HOME
if [ ! -f $cxf_home/lib/cxf-manifest-incubator.jar ]; then
cxf_home=`dirname $0`/..
@@ -40,12 +52,44 @@
fi
fi
+#
+# add the jdk's tools.jar to the classpath
+#
+
+sun_tool_path=""
+if [ $darwin == false ]; then
+ sun_tool_path=${JAVA_HOME}/lib/tools.jar
+ if [ ! -f $sun_tool_path ]; then
+ echo "ERROR: Set JAVA_HOME to the path where the J2SE 5.0 (JDK5.0) is
installed"
+ exit 1
+ fi
+fi
-log_config=$cxf_home/etc/logging.properties
-
+log_config=$cxf_home/etc/logging.properties
-cxf_classpath=${cxf_jar}:${CLASSPATH}
+# For Cygwin, switch paths to appropriate format before running java
+# For PATHs convert to unix format first, then to windows format to ensure
+# both formats are supported. Probably this will fail on directories with ;
+# in the name in the path. Let's assume that paths containing ; are more
+# rare than windows style paths on cygwin.
+if $cygwin; then
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ cxf_classpath=`cygpath --$format "${cxf_jar}"`
+ if [ ! -z "${CLASSPATH}" ]; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format --path "${CLASSPATH}"`
+ fi
+ if [ ! -z "${sun_tool_path}" ] ; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format "${sun_tool_path}"`
+ fi
+ log_config=`cygpath --$format "$log_config"`
+else
+ cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+fi
$JAVA_HOME/bin/java -cp ${cxf_classpath}
-Djava.util.logging.config.file=$log_config
org.apache.cxf.management.utils.ManagementConsole "$@"
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2java?view=diff&rev=558961&r1=558960&r2=558961
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2java Tue Jul 24
01:42:53 2007
@@ -21,6 +21,17 @@
#!/bin/sh
# run the Apache CXF wsdl2java tool
#
+# Check for irritating 'operating systems'.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ Darwin*) darwin=true
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+ fi
+ ;;
+esac
me=`basename $0`
cxf_home=$CXF_HOME
@@ -44,20 +55,24 @@
# add the jdk's tools.jar to the classpath
#
-sun_tool_path=""
-if [ ! `uname` = 'Darwin' ]; then
- sun_tool_path=${JAVA_HOME}/lib/tools.jar
- if [ ! -f $sun_tool_path ]; then
- echo "ERROR: Set JAVA_HOME to the path where the J2SE 5.0 (JDK5.0) is
installed"
- exit 1
- fi
-fi
-
-log_config=$cxf_home/etc/logging.properties
-
-
-
-cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+log_config=$cxf_home/etc/logging.properties
+if $cygwin; then
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ cxf_classpath=`cygpath --$format "${cxf_jar}"`
+ if [ ! -z "${CLASSPATH}" ]; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format --path "${CLASSPATH}"`
+ fi
+ if [ ! -z "${sun_tool_path}" ] ; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format "${sun_tool_path}"`
+ fi
+ log_config=`cygpath --$format "$log_config"`
+else
+ cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+fi
$JAVA_HOME/bin/java -cp ${cxf_classpath}
-Djava.util.logging.config.file=$log_config
org.apache.cxf.tools.wsdlto.WSDLToJava "$@"
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2service
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2service?view=diff&rev=558961&r1=558960&r2=558961
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2service
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2service Tue Jul
24 01:42:53 2007
@@ -21,6 +21,18 @@
#!/bin/sh
# run the Apache CXF wsdl2service tool
#
+# Check for irritating 'operating systems'.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ Darwin*) darwin=true
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+ fi
+ ;;
+esac
+
me=`basename $0`
cxf_home=$CXF_HOME
@@ -45,7 +57,7 @@
#
sun_tool_path=""
-if [ ! `uname` = 'Darwin' ]; then
+if [ $darwin == false ]; then
sun_tool_path=${JAVA_HOME}/lib/tools.jar
if [ ! -f $sun_tool_path ]; then
echo "ERROR: Set JAVA_HOME to the path where the J2SE 5.0 (JDK5.0) is
installed"
@@ -55,7 +67,29 @@
log_config=$cxf_home/etc/logging.properties
-cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+
+# For Cygwin, switch paths to appropriate format before running java
+# For PATHs convert to unix format first, then to windows format to ensure
+# both formats are supported. Probably this will fail on directories with ;
+# in the name in the path. Let's assume that paths containing ; are more
+# rare than windows style paths on cygwin.
+if $cygwin; then
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ cxf_classpath=`cygpath --$format "${cxf_jar}"`
+ if [ ! -z "${CLASSPATH}" ]; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format --path "${CLASSPATH}"`
+ fi
+ if [ ! -z "${sun_tool_path}" ] ; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format "${sun_tool_path}"`
+ fi
+ log_config=`cygpath --$format "$log_config"`
+else
+ cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+fi
$JAVA_HOME/bin/java -cp ${cxf_classpath}
-Djava.util.logging.config.file=$log_config
org.apache.cxf.tools.misc.WSDLToService "$@"
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2soap
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2soap?view=diff&rev=558961&r1=558960&r2=558961
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2soap (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2soap Tue Jul 24
01:42:53 2007
@@ -21,7 +21,17 @@
#!/bin/sh
# run the Apache CXF wsdl2soap tool
#
-
+# Check for irritating 'operating systems'.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ Darwin*) darwin=true
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+ fi
+ ;;
+esac
me=`basename $0`
cxf_home=$CXF_HOME
if [ ! -f $cxf_home/lib/cxf-manifest-incubator.jar ]; then
@@ -45,7 +55,7 @@
#
sun_tool_path=""
-if [ ! `uname` = 'Darwin' ]; then
+if [ $darwin == false ]; then
sun_tool_path=${JAVA_HOME}/lib/tools.jar
if [ ! -f $sun_tool_path ]; then
echo "ERROR: Set JAVA_HOME to the path where the J2SE 5.0 (JDK5.0) is
installed"
@@ -55,7 +65,29 @@
log_config=$cxf_home/etc/logging.properties
-cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+
+# For Cygwin, switch paths to appropriate format before running java
+# For PATHs convert to unix format first, then to windows format to ensure
+# both formats are supported. Probably this will fail on directories with ;
+# in the name in the path. Let's assume that paths containing ; are more
+# rare than windows style paths on cygwin.
+if $cygwin; then
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ cxf_classpath=`cygpath --$format "${cxf_jar}"`
+ if [ ! -z "${CLASSPATH}" ]; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format --path "${CLASSPATH}"`
+ fi
+ if [ ! -z "${sun_tool_path}" ] ; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format "${sun_tool_path}"`
+ fi
+ log_config=`cygpath --$format "$log_config"`
+else
+ cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+fi
$JAVA_HOME/bin/java -cp ${cxf_classpath}
-Djava.util.logging.config.file=$log_config
org.apache.cxf.tools.misc.WSDLToSoap "$@"
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2xml?view=diff&rev=558961&r1=558960&r2=558961
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2xml Tue Jul 24
01:42:53 2007
@@ -20,6 +20,17 @@
#!/bin/sh
# run the Apache CXF wsdl2xml tool
#
+# Check for irritating 'operating systems'.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ Darwin*) darwin=true
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+ fi
+ ;;
+esac
me=`basename $0`
cxf_home=$CXF_HOME
@@ -44,7 +55,7 @@
#
sun_tool_path=""
-if [ ! `uname` = 'Darwin' ]; then
+if [ $darwin == false ]; then
sun_tool_path=${JAVA_HOME}/lib/tools.jar
if [ ! -f $sun_tool_path ]; then
echo "ERROR: Set JAVA_HOME to the path where the J2SE 5.0 (JDK5.0) is
installed"
@@ -54,7 +65,29 @@
log_config=$cxf_home/etc/logging.properties
-cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+
+# For Cygwin, switch paths to appropriate format before running java
+# For PATHs convert to unix format first, then to windows format to ensure
+# both formats are supported. Probably this will fail on directories with ;
+# in the name in the path. Let's assume that paths containing ; are more
+# rare than windows style paths on cygwin.
+if $cygwin; then
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ cxf_classpath=`cygpath --$format "${cxf_jar}"`
+ if [ ! -z "${CLASSPATH}" ]; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format --path "${CLASSPATH}"`
+ fi
+ if [ ! -z "${sun_tool_path}" ] ; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format "${sun_tool_path}"`
+ fi
+ log_config=`cygpath --$format "$log_config"`
+else
+ cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+fi
$JAVA_HOME/bin/java -cp ${cxf_classpath}
-Djava.util.logging.config.file=$log_config org.apache.cxf.tools.misc.WSDLToXML
"$@"
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/wsdlvalidator
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/wsdlvalidator?view=diff&rev=558961&r1=558960&r2=558961
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/wsdlvalidator
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/wsdlvalidator Tue Jul
24 01:42:53 2007
@@ -21,6 +21,17 @@
#!/bin/sh
# run the Apache CXF wsdl2java tool
#
+# Check for irritating 'operating systems'.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ Darwin*) darwin=true
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+ fi
+ ;;
+esac
me=`basename $0`
cxf_home=$CXF_HOME
@@ -40,12 +51,11 @@
fi
fi
-#
# add the jdk's tools.jar to the classpath
#
sun_tool_path=""
-if [ ! `uname` = 'Darwin' ]; then
+if [ $darwin == false ]; then
sun_tool_path=${JAVA_HOME}/lib/tools.jar
if [ ! -f $sun_tool_path ]; then
echo "ERROR: Set JAVA_HOME to the path where the J2SE 5.0 (JDK5.0) is
installed"
@@ -53,9 +63,31 @@
fi
fi
-log_config=$cxf_home/etc/logging.properties
+log_config=$cxf_home/etc/logging.properties
+
-cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+# For Cygwin, switch paths to appropriate format before running java
+# For PATHs convert to unix format first, then to windows format to ensure
+# both formats are supported. Probably this will fail on directories with ;
+# in the name in the path. Let's assume that paths containing ; are more
+# rare than windows style paths on cygwin.
+if $cygwin; then
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ cxf_classpath=`cygpath --$format "${cxf_jar}"`
+ if [ ! -z "${CLASSPATH}" ]; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format --path "${CLASSPATH}"`
+ fi
+ if [ ! -z "${sun_tool_path}" ] ; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format "${sun_tool_path}"`
+ fi
+ log_config=`cygpath --$format "$log_config"`
+else
+ cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+fi
$JAVA_HOME/bin/java -cp ${cxf_classpath}
-Djava.util.logging.config.file=$log_config
org.apache.cxf.tools.validator.WSDLValidator "$@"
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/xsd2wsdl
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/xsd2wsdl?view=diff&rev=558961&r1=558960&r2=558961
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/xsd2wsdl (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/xsd2wsdl Tue Jul 24
01:42:53 2007
@@ -21,6 +21,17 @@
#!/bin/sh
# run the Apache CXF xsd2wsdl tool
#
+# Check for irritating 'operating systems'.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ Darwin*) darwin=true
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+ fi
+ ;;
+esac
me=`basename $0`
cxf_home=$CXF_HOME
@@ -44,17 +55,34 @@
# add the jdk's tools.jar to the classpath
#
-sun_tool_path=${JAVA_HOME}/lib/tools.jar
+sun_tool_path=""
+if [ $darwin == false ]; then
+ sun_tool_path=${JAVA_HOME}/lib/tools.jar
+ if [ ! -f $sun_tool_path ]; then
+ echo "ERROR: Set JAVA_HOME to the path where the J2SE 5.0 (JDK5.0) is
installed"
+ exit 1
+ fi
+fi
-if [ ! -f $sun_tool_path ]; then
- echo "ERROR: Set JAVA_HOME to the path where the J2SE 5.0 (JDK5.0) is
installed"
- exit 1
-fi
log_config=$cxf_home/etc/logging.properties
-
-cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
-
+if $cygwin; then
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ cxf_classpath=`cygpath --$format "${cxf_jar}"`
+ if [ ! -z "${CLASSPATH}" ]; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format --path "${CLASSPATH}"`
+ fi
+ if [ ! -z "${sun_tool_path}" ] ; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format "${sun_tool_path}"`
+ fi
+ log_config=`cygpath --$format "$log_config"`
+else
+ cxf_classpath=${cxf_jar}:${CLASSPATH}:${sun_tool_path}
+fi
$JAVA_HOME/bin/java -cp ${cxf_classpath}
-Djava.util.logging.config.file=$log_config org.apache.cxf.tools.misc.XSDToWSDL
"$@"