]> granicus.if.org Git - docbook-dsssl/commitdiff
Add support for Java proxy
authorNorman Walsh <ndw@nwalsh.com>
Sun, 29 Dec 2002 14:45:44 +0000 (14:45 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sun, 29 Dec 2002 14:45:44 +0000 (14:45 +0000)
cvstools/xjparse

index f102988e6bc86157bec4014caf9c076cbc6e9698..3a0fba010281ae6e2e9dd4ec94af1f2bf5e48e7c 100755 (executable)
@@ -15,6 +15,28 @@ if [ ! "$RESOLVER" ]; then
   echo "cannot find resolver classes" 1>&2
   exit 1
 fi
+<<<<<<< xjparse
+
+for path in "/usr/local/jaxp-1.1/jaxp.jar" \
+            "/usr/local/java/jaxp-1.1/jaxp.jar" \
+            "/usr/local/share/java/jaxp-1.1/jaxp.jar" \
+            "/usr/share/java/jaxp.jar"; do
+  if [ -f "$path" -o -d "$path" ]; then
+    JAXP="$path"
+    break
+  fi
+done
+
+HTTP_PROXY=
+HTTPS_PROXY=
+
+if [ "$http_proxy_host" != "" ]; then
+    HTTP_PROXY="-Dhttp.proxyHost=$http_proxy_host -Dhttp.proxyPort=$http_proxy_port"
+    HTTPS_PROXY="-Dhttps.proxyHost=$http_proxy_host -Dhttps.proxyPort=$http_proxy_port"
+fi
+
+XERCES="${XERCES:-/projects/apache/xml-xerces/java/build/classes}:"
+
 if [ ${RESOLVER/sun/} != ${RESOLVER} ]; then
     # guess this is the sun resolver
     XREAD=com.sun.resolver.apps.xread
@@ -25,5 +47,6 @@ fi
 
 CLASSPATH=$JAXP:$RESOLVER:$XERCES:$CLASSPATH
 
-exec java -cp $CLASSPATH $XREAD $*
+#echo $CLASSPATH
 
+exec java $HTTP_PROXY $HTTPS_PROXY -cp $CLASSPATH $XREAD $*