You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2012/04/29 14:33:11 UTC
svn commit: r1331906 - in
/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start:
workbench.bat workbench.sh
Author: fmui
Date: Sun Apr 29 12:33:11 2012
New Revision: 1331906
URL: http://svn.apache.org/viewvc?rev=1331906&view=rev
Log:
Workbench: set system proxies
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.bat
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.sh
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.bat
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.bat?rev=1331906&r1=1331905&r2=1331906&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.bat (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.bat Sun Apr 29 12:33:11 2012
@@ -18,4 +18,6 @@ rem @version@
cd %~dp0\lib
-start /B javaw -classpath ".;*" org.apache.chemistry.opencmis.workbench.Workbench
\ No newline at end of file
+set JAVA_OPTS="-Djava.net.useSystemProxies=true"
+
+start /B javaw %JAVA_OPTS% -classpath ".;*" org.apache.chemistry.opencmis.workbench.Workbench
\ No newline at end of file
Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.sh
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.sh?rev=1331906&r1=1331905&r2=1331906&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.sh (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.sh Sun Apr 29 12:33:11 2012
@@ -38,4 +38,20 @@ for i in *.jar; do
WCP="$i:${WCP}"
done
-exec $JAVA -classpath $WCP org.apache.chemistry.opencmis.workbench.Workbench &
\ No newline at end of file
+
+JAVA_OPTS="-Djava.net.useSystemProxies=true"
+
+if [ -n "$http_proxy" ]; then
+ HTTP_PROXY_HOST=$(echo $http_proxy | sed 's/http:\/\/\(.*\):.*/\1/')
+ HTTP_PROXY_PORT=$(echo $http_proxy | sed 's/http:\/\/.*:\(.*\)/\1/')
+ JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=$HTTP_PROXY_HOST -Dhttp.proxyPort=$HTTP_PROXY_PORT"
+fi
+
+if [ -n "$https_proxy" ]; then
+ HTTPS_PROXY_HOST=$(echo $https_proxy | sed 's/http:\/\/\(.*\):.*/\1/')
+ HTTPS_PROXY_PORT=$(echo $https_proxy | sed 's/http:\/\/.*:\(.*\)/\1/')
+ JAVA_OPTS="$JAVA_OPTS -Dhttps.proxyHost=$HTTPS_PROXY_HOST -Dhttps.proxyPort=$HTTPS_PROXY_PORT"
+fi
+
+
+exec $JAVA $JAVA_OPTS -classpath $WCP org.apache.chemistry.opencmis.workbench.Workbench &
\ No newline at end of file