You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ja...@rzf.fin-nrw.de on 2003/10/01 07:19:34 UTC

RE: Directory names (looping thru property file )

I had written an explanation in the FAQ on jGuru:

http://www.jguru.com/faq/view.jsp?EID=1099123
"Evaluating properties based on other properties"

You need the code described there, so I recommend reading that.

I don´t know the "Ashkelon".



Jan



> Thanks again. I'm working on ur suggestions. While your logic 
> might be the
> best thing to do but pls tell me on more thing. I was 
> wondering is I could
> do something like this:
> 
> Make entries for source and destination folders in a property 
> file and then
> do a looping through them. Like :
> 
> Src.project.1 = src\devSystem\Project1
> Dest.project.1 = javadocs\devSystem\Project1
> 
> Src.project.2 = src\devBR\Project2
> Dest.project.2 = javadocs\devBR\Project2
> 
> 
> Can I have my ant script read one set of src and dest and 
> process them and
> then move to the next one.
> 
> Something like that. 
> 
> Actually I'm using a similar property file for another tool 
> called Ashkelon
> but that tool takes care of this loop on itself using java code.
> 
> So I was wondering if I could use the same or similar 
> property file with
> ant.
> 
> Vikas
> 
> 
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
> Sent: Tuesday, September 30, 2003 9:24 AM
> To: user@ant.apache.org
> Subject: RE: Directory names
> 
> I wouldn´t do a loop and several if´s.
> I would try that:
> 
> - let the project create their javadoc in their own directory 
> (common name
>   e.g. apidoc):
>   Projects/devSystem/Project1/apidoc
> - do the creation with a unified target
>   <target name="javadoc"/>
> - write that target in an external file
>   Projects/javadoc.xml
> - include that in the several buildfiles
>   - <import file="../../javadoc.xml"/>
>   - XML entity include
> - write a global buildfile
>   Projects/build.xml
>   - iterates over all sub-buildfiles
>     <subant>
>   - copy all apidoc directories
>     <copy>, <fileset>, <mapper>
> 
> 
> <subant> and <import> are part of Ant 1.6 (beta available at 
> http://cvs.apache.org/dist/ant/v1.6beta1/ )
> 
> 
> Jan
> 
> 
> > -----Original Message-----
> > From: Vikas Phonsa [mailto:VPhonsa@suz.com]
> > Sent: Tuesday, September 30, 2003 6:15 PM
> > To: 'Ant Users List'
> > Subject: RE: Directory names
> > 
> > 
> > Jan,
> > Thanks a lot, this works. I wanted to somehow use your answer for my
> > original problem. Pls take a look at this and I would appreciate any
> > suggestions:
> > 
> > I'm trying to make an ant script that would scan several 
> > different Project
> > folders, generate javadocs and place the docs in different 
> destination
> > folders for each project based on the name and director 
> > structure of the
> > project. I am able to generate docs if all projects and docs 
> > were under one
> > folder. But the scr and destination folders are supposed to be under
> > different directory structures like this:
> > 
> > Src: Projects/devSystem/Project1
> >      Projects/devBR/Project2
> > 
> > Destination: Javadoc/devSystem/Project1
> > 		 Javadoc/devBR/Project2
> > 
> > I know if-else task exists in ant-contrib. But can I 
> > implement some if-else
> > functionality to do a selection based on directory structure 
> > or names so
> > that the docs go to the appropriate folders.
> > 
> > Thanks
> > 
> > Vikas
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > -----Original Message-----
> > From: Jan.Materne@rzf.fin-nrw.de 
[mailto:Jan.Materne@rzf.fin-nrw.de] 
> Sent: Monday, September 29, 2003 11:21 PM
> To: user@ant.apache.org
> Subject: RE: Directory names
> 
> Does
> 
> <project>
>     <dirset id="fs" dir="." includes="*"/>
>     <pathconvert property="fs.value" refid="fs"
> pathsep="${line.separator}"/>
>     <echo>${fs.value}</echo>
> </project>
> 
> 
> help?
> 
> 
> Jan
> 
> > -----Original Message-----
> > From: Vikas Phonsa [mailto:VPhonsa@suz.com]
> > Sent: Monday, September 29, 2003 10:18 PM
> > To: 'Ant Users List'
> > Subject: Directory names
> > 
> > 
> > Is there any way ant could be used to get a list of names of 
> > directories
> > under a base directory.
> > I have checked out basename and dirname but it seems they 
> > won't serve the
> > purpose.
> > 
> > Thanks
> > vikas
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org