ant - Get list of files from URL -


i'll automate somehow keeping netbeans daily build what's available.

basically follows:

  1. get file list http://bits.netbeans.org/download/trunk/nightly/latest/zip/
  2. download file (let's i'm interested in java.zip)
  3. unzip

i have ant script capable of doing 2 , 3. need figure out how first. see below:

<?xml version="1.0" encoding="utf-8"?> <project name="netbeans daily build" basedir="."> <description>updates daily build</description> <property name="zip.name" value="netbeans-6.9.1-201007282301-ml-javase.zip"/> <property name="dist" value="z:/program files/netbeans 7.0/"/> <property name="zip.url"    value="http://bits.netbeans.org/download/trunk/nightly/latest/zip/"/> <fileset id="ant-contrib-jar" dir="./">     <include name="ant-contrib-*.jar" /> </fileset> <pathconvert property="ant-contrib-jar" refid="ant-contrib-jar" pathsep="," /> <basename property="ant-contrib-filename" file="${ant-contrib-jar}"/> <property name="ant-contrib-loc" value="./${ant-contrib-filename}"/> <available file="${ant-contrib-loc}" property="ant-contrib.present"/> <fail unless="ant-contrib.present" message="the ant-contrib jar doesn't exist at: ${ant-contrib-loc}, can't build. check settings!" /> <taskdef resource="net/sf/antcontrib/antcontrib.properties">     <classpath>         <pathelement location="${ant-contrib-loc}"/>     </classpath> </taskdef> <!--delete old copies of platforms--> <delete>     <fileset dir="${dist}" includes="**/*.zip" excludes="${zip.name}"/> </delete> <available file="${zip.url}${zip.name}" property="file.exists"/> <if>      <not>         <isset property="file.exists"/>     </not>     <then>         <get src="${zip.url}${zip.name}" dest="./" skipexisting="true" verbose="true"/>         <!--only overwrite if newer         <unzip src="${dist}/${zip.name}" dest="${dist}" overwrite="false"/>-->     </then> </if> </project> 

i need somehow figure out correct file name download. doing in batch file (without ant) acceptable well.

thanks in advance!

how check out latest version using mercurial? should tell how: http://netbeans.org/community/sources/hg.html


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -