Hi,

The idea is to use <get>,<unzip> and <untar> to install the needed elements and 
use the build.properties file to define where to download them.

The location to download the element is like:
commons-beanutils.loc=http://jakarta.apache.org/builds/jakarta-commons/release/c
ommons-beanutils/v1.2/commons-beanutils-1.2.tar.gz

I have started to add the download target. Find the changes in the attached patch.

It needs ant-1.5 to work behind a proxy.
Some files cannot be downloaded because their download need a licence acceptance...

Any comments?

Cheers

Jean-frederic

Clere, Jean-Frederic wrote:
> Bill Barker wrote:
> 
>> ----- Original Message -----
>> From: "jean-frederic clere" <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> Sent: Friday, May 03, 2002 7:44 AM
>> Subject: Add a target in build.xml
>>
>>
>>
>>> Hi,
>>>
>>> I would like to add a target to the TC build.xml: download.
>>> Last time I have tried to help to release TC I have found there is no
>>
>>
>> "clean"
>>
>>> way to know easly what is needed to build a TC release (which xerces.jar
>>
>>
>> is
>>
>>> needed for example).
>>> The download would download using wget and extract the need files using
>>
>>
>> tar.
>>
>>> Any comments?
>>>
>>
>>
>> Jon will be so disappointed that you don't want to use Manven. ;-)
> 
> 
> I want to try a quick "hack" so modifying the existing build.xml is the 
> fastest.
> 
>>
>>
>>> Cheers
>>>
>>> Jean-frederic
>>>
>>>
>>> -- 
>>> To unsubscribe, e-mail:
>>
>>
>> <mailto:[EMAIL PROTECTED]>
>>
>>> For additional commands, e-mail:
>>
>>
>> <mailto:[EMAIL PROTECTED]>
>>
>>
>>
>> -- 
>> To unsubscribe, e-mail:   
>> <mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail: 
>> <mailto:[EMAIL PROTECTED]>
>>
>>
>>
> 
> 
> 
> 
> -- 
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 


Index: build.properties.sample
===================================================================
RCS file: /home/cvs/mirror/jakarta-tomcat-4.0/build.properties.sample,v
retrieving revision 1.34
diff -u -r1.34 build.properties.sample
--- build.properties.sample     16 Apr 2002 20:16:45 -0000      1.34
+++ build.properties.sample     6 May 2002 16:02:36 -0000
@@ -27,6 +27,11 @@
 #Hide configuration flags display
 #flags.hide=on
 
+#Proxy to download subproject
+#proxy.host=proxy.domain
+#proxy.port=8080
+#proxy.use=on
+
 
 # ----- Default Base Path for Dependent Packages -----
 base.path=/usr/local
@@ -49,24 +54,28 @@
 commons-beanutils.home=${base.path}/commons-beanutils-1.2
 commons-beanutils.lib=${commons-beanutils.home}
 commons-beanutils.jar=${commons-beanutils.lib}/commons-beanutils.jar
+commons-beanutils.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-beanutils/v1.2/commons-beanutils-1.2.tar.gz
 
 
 # ----- Commons Collections, version 1.0 or later -----
 commons-collections.home=${base.path}/commons-collections-1.0
 commons-collections.lib=${commons-collections.home}
 commons-collections.jar=${commons-collections.lib}/commons-collections.jar
+commons-collections.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-collections/v1.0/commons-collections-1.0.tar.gz
 
 
 # ----- Commons Digester, version 1.1.1 or later -----
 commons-digester.home=${base.path}/commons-digester-1.1.1
 commons-digester.lib=${commons-digester.home}
 commons-digester.jar=${commons-digester.lib}/commons-digester.jar
+commons-digester.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-digester/v1.1.1/commons-digester-1.1.1.tar.gz
 
 
 # ----- Commons Logging, version 0.1 or later -----
 commons-logging.home=${base.path}/commons-logging-1.0
 commons-logging.lib=${commons-logging.home}
 commons-logging.jar=${commons-logging.lib}/commons-logging.jar
+commons-logging.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-logging/v1.0/commons-logging-1.0.tar.gz
 
 
 # ----- Java Naming and Directory Interface (JNDI), version 1.2 or later -----
@@ -82,6 +91,7 @@
 regexp.home=${base.path}/jakarta-regexp-1.2
 regexp.lib=${regexp.home}
 regexp.jar=${regexp.lib}/jakarta-regexp-1.2.jar
+regexp.loc=http://jakarta.apache.org/builds/jakarta-regexp/release/v1.2/jakarta-regexp-1.2.tar.gz
 
 
 # ----- Jakarta Servlet API Classes (Servlet 2.3 / JSP 1.2) -----
@@ -101,6 +111,7 @@
 # Note: Optional with JDK 1.4+, or if Xerces 1.x is present
 xerces.home=${base.path}/xerces-2_0_1
 xerces.lib=${xerces.home}
+xerces.loc=http://xml.apache.org/dist/xerces-j/Xerces-J-bin.2.0.1.tar.gz
 xercesImpl.jar=${xerces.lib}/xercesImpl.jar
 xmlParserAPIs.jar=${xerces.lib}/xmlParserAPIs.jar
 
Index: build.xml
===================================================================
RCS file: /home/cvs/mirror/jakarta-tomcat-4.0/build.xml,v
retrieving revision 1.66
diff -u -r1.66 build.xml
--- build.xml   25 Apr 2002 14:50:10 -0000      1.66
+++ build.xml   6 May 2002 16:02:37 -0000
@@ -443,5 +443,37 @@
     <delete file="${tomcat.dist}/${jtc.final-src.name}.tar" />
   </target>
 
+  <target name="download" depends="proxyflags">
+    <!-- Downdown any sub package or tools needed. -->
+    <antcall target="downloadgz">
+      <param name="sourcefile" value="${commons-logging.loc}"/>
+    </antcall>
+    <antcall target="downloadgz">
+      <param name="sourcefile" value="${commons-beanutils.loc}"/>
+    </antcall>
+  </target>
+
+  <target name="proxyflags">
+    <!-- check proxy parameters. -->
+    <condition property="useproxy">
+      <equals arg1="${proxy.use}" arg2="on" />
+    </condition>
+  </target>
+
+  <target name="setproxy"  if="useproxy">
+    <taskdef name="setproxy"
+      classname="org.apache.tools.ant.taskdefs.optional.net.SetProxy" />
+    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/> 
+    <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/>
+  </target>
+
+  <target name="downloadgz" depends="setproxy">
+    <!-- Downdow and extract the package -->
+    <get src="${sourcefile}" dest="${base.path}/file.tar.gz" />
+    <gunzip src="${base.path}/file.tar.gz" dest="${base.path}/file.tar"/>
+    <untar src="${base.path}/file.tar" dest="${base.path}"/>
+    <delete file="${base.path}/file.tar"/>
+    <delete file="${base.path}/file.tar.gz"/>
+  </target>
 
 </project>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to