You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2004/07/24 23:31:29 UTC

svn commit: rev 23219 - incubator/beehive/trunk

Author: ekoneil
Date: Sat Jul 24 14:31:28 2004
New Revision: 23219

Modified:
   incubator/beehive/trunk/BUILDING.txt
   incubator/beehive/trunk/build.xml
Log:
Add proxy supprt to the build.

This can be used to setup the correct proxy information in order to download the JSR 173 support depending on your network configuration.

This was contributed by Venkat.

BB: self
DRT: pass 



Modified: incubator/beehive/trunk/BUILDING.txt
==============================================================================
--- incubator/beehive/trunk/BUILDING.txt	(original)
+++ incubator/beehive/trunk/BUILDING.txt	Sat Jul 24 14:31:28 2004
@@ -7,6 +7,9 @@
 
   http://java.sun.com/j2se/1.5.0/download.jsp
 
+be sure to have version 1.5.0-beta2-b51.  Earlier versions of JDK 1.5 will not 
+work correctly.
+
 Set the BEEHIVE_HOME environment variable to point to your root beehive/trunk 
 directory.  For example, if you ran svn checkout from "C:\MyProjects", your 
 BEEHIVE_HOME will be "C:\MyProjects\beehive\trunk"
@@ -32,8 +35,9 @@
 Because Beehive depends on a set of external software, these dependencies need
 to be installed before a build can be successful.  You will need a network
 connection for this step because jsr173_api.jar needs to be downloaded from a 
-website.  Once this has been downloaded, the build and tests can be run 
-successfully without a network connection.  To install the external 
+website; if you need to use a proxy for this downolad, see the "Using Proxies" 
+instructions below.  Once this has been downloaded, the build and tests can 
+be run successfully without a network connection.  To install the external 
 dependnecies, run:
 
     $>ant bootstrap
@@ -48,6 +52,33 @@
 
     $>ant drt
 
+Using Proxies With a Beehive Build
+====================================
+
+If you need to use proxies you can setup additional environment variables
+so that the Ant "bootstrap" target is successful in downloading the 
+JSR 173 API JAR file.  
+
+PROXYHOST=<name of proxy host>
+PROXYPORT=<port used for proxying>
+PROXYUSER=<username for proxy authentication>
+PROXYPASSWORD=<password for proxy authentication>
+NONPROXYHOSTS=<hosts that should not be proxied>
+SOCKSPROXYHOST=<socks proxy host name>
+SOCKSPROXYPORT=<socks proxy port>
+
+At a minimum, you will need to set PROXYHOST and PROXYPORT if your
+network environment requires a proxy connection.  To set these
+environment variables in your shell, run:
+
+    set PROXYHOST=<name of proxy host>
+
+in a Windows shell and 
+
+    export PROXYHOST=<name of proxy host>
 
+in a UNIX shell.
 
+For information on proxy support using the <setproxy> task, please
+visit http://ant.apache.org/manual/OptionalTasks/setproxy.html
 

Modified: incubator/beehive/trunk/build.xml
==============================================================================
--- incubator/beehive/trunk/build.xml	(original)
+++ incubator/beehive/trunk/build.xml	Sat Jul 24 14:31:28 2004
@@ -14,7 +14,7 @@
     <property name="ant.installer" location="${beehive.external.dir}/ant/apache-ant-1.6.1-bin.zip"/>
     <property name="jsr173.installer" location="${beehive.external.dir}/xmlbeans/jsr173_api.jar"/>
 
-    <target name="bootstrap" description="Install external dependencies to the installed/ directory">
+    <target name="bootstrap" depends="ensure.proxysettings" description="Install external dependencies to the installed/ directory">
         <antcall target="install.deps"/>
         <ant dir="test/ant" antfile="runTomcat.xml" target="reset.config"/>
 
@@ -150,6 +150,52 @@
              verbose="true" usetimestamp="true" ignoreerrors="false"/>
 
         <unzip src="${jsr173.installer}" dest="${beehive.installed.dir}/jsr173"/>
+    </target>
+
+    <!-- ============================================= -->
+    <!--                                               -->
+    <!-- Proxy Setup Targets.                          -->
+    <!--                                               -->
+    <!-- These settings are used if a proxy needs to   -->
+    <!-- be used when downloading third party software -->
+    <!-- on which Beehive depends.  See BUILDING.txt   -->
+    <!-- for more information.                         -->
+    <!--                                               -->
+    <!-- ============================================= -->
+    <target name="ensure.proxysettings">
+        <echo>Check to see if proxy setup is required</echo>
+        <condition property="proxy.needed">
+	   <and>
+		<isset property="os.PROXYHOST"/>
+	   </and>
+	</condition>
+        <condition property="socks.proxy.needed" value="true">
+	   <and>
+		<isset property="os.SOCKSPROXYHOST"/>
+	   </and>
+	</condition>
+        <antcall target="set.proxy"/>
+        <antcall target="set.socks.proxy"/>
+    </target>
+
+    <target name="set.proxy" if="proxy.needed">
+       <echo>Proxy setup needed.</echo>
+       <echo>Proxy host: ${os.PROXYHOST}</echo>
+       <echo>Proxy port: ${os.PROXYPORT}</echo>
+       <echo>Proxy user: ${os.PROXYUSER}</echo>
+       <echo>Proxy password: ${os.PROXYPASSWORD}</echo>
+       <echo>Non proxy hosts: ${os.NONPROXYHOSTS}</echo>
+       <setproxy proxyhost="${os.PROXYHOST}"
+                 proxyport="${os.PROXYPORT}"
+                 proxyuser="${os.PROXYUSER}"
+                 proxypassword="${os.PROXYPASSWORD}"
+                 nonproxyhosts="${os.NONPROXYHOSTS}"/>
+    </target>
+
+    <target name="set.socks.proxy" if="socks.proxy.needed">
+       <echo>Socks Proxy setup needed.</echo>
+       <setproxy socksproxyhost="${os.SOCKSPROXYHOST}"
+                 socksproxyport="${os.SOCKSPROXYPORT}"/>
     </target>
 
     <target name="usage" description="Print the usage for this build.xml">