ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: directory index to URL creation
Date Tue, 22 Apr 2003 10:30:16 GMT
For directory listings you can use the Dir2Xml from Sourceforge.
http://dir2xml.sourceforge.net/

Jan Matèrne

> -----Urspr√ľngliche Nachricht-----
> Von: Kiarna Boyd [mailto:kiarna@hotmail.com]
> Gesendet am: Montag, 21. April 2003 21:47
> An: user@ant.apache.org
> Betreff: RE:directory index to URL creation
> 
> Hi folks,
> 
> This isn't pretty and maybe others have tidier ways of doing 
> this but I 
> found a way to index my directory structure and use it for creating 
> sequential URL hits to update the database jsp's.
> I have 'get' ignoreerrors on because I need to buff up my 
> conditionals for 
> more than one arg.
> 
> I use a lot of exec commands making dinky scripts for non ant 
> functionality.
> 
> 1. made a script for exec to call that just does a 'ls -m' of 
> the basedir 
> the output is directed to my foreach list variable.
> 
> 2. created the foreach target using the list ability and 
> delimiter to handle 
> the output of 'ls -m'
> 
> 3. Conditional tag to keep it from choking on a non URL 
> directory in the 
> path.
> 
> 4. very simple use of ant's get command to tap the servlet.
> 
> 1-2
> <target name="updatejsp" description="to hit the web url and 
> update each 
> client" >
>                 <exec executable="${scripts}/list" 
> outputproperty="list" >
>        <env key="BASEDIR" value="${basedir}"/>
>         </exec>
>         <foreach target="update4jsp" param="thisEnv" list="${list}"  
> inheritall="true" delimiter=", " >
>         </foreach>
> </target>
> 
> 3-4
> <target name="update4jsp" description="conditions for jsp update" >
>                 <echo>"${thisEnv}"</echo>
>         <condition property="not.client.dir" >
>                 <not>
>                 <equals arg1="${thisEnv}" arg2="analog"/>
>                 </not>
>         </condition>
>         <antcall target="jsp" />
> 
> </target>
> 
> 4
> <target name="jsp" description="hits the URL servlet"  
> if="not.client.dir"  
>  >
>         <echo>"valid client to update ${thisEnv}"</echo>
>                 <get ignoreerrors="true" 
> src="${url2}/${thisEnv}/${upservlet}" dest="/dev/null" />
> 
> </target>
> 
> 
> 
> 
> 
> 
> Hope this helps other people that have low level poking 
> skills like me!
> I welcome suggestions on improving the build.file if you have 
> them, but I'm 
> glad I got it to work!
> 
> Kiarna
> 
> 
> 
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
> http://join.msn.com/?page=features/featuredemail
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message