ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lakshmi Vempati <>
Subject Re: Copying specific files
Date Wed, 28 May 2003 20:33:38 GMT
That worked very well and is much nicer than what I
was trying to do :-)

Thanks very much!


Tharp, Joshua L, SOLGV wrote:
> Ok, then the other way to do it with the copy task is to use a selector.
> <copy todir="temp1">
>     <fileset dir="temp" includes="*.pdf">
>         <present present="both" targetdir="temp">
>             <mapper type="glob" from="*.pdf" to="*.lnx" />
>         </present>
>     </fileset>
> </copy>
> I tried the one I sent you before (before I sent it), but I didn't check
> the contents... This time I tried it and checked the contents, and it
> works! ;)
> Josh
> -----Original Message-----
> From: Lakshmi Vempati [] 
> Sent: Wednesday, May 28, 2003 12:28 PM
> To: Ant Users List
> Subject: Re: Copying specific files
> I already tried that and unfortunately that does not work.
> All that does is copy the lyx file to the distribution directory and 
> renames it with extension pdf instead.
> I think I found a way though. Here is what I am doing.
> I can create the list of lyx files using the following
> <path id="lyxfiles" >
>   <fileset dir="${ROOT}/${PRJECT}/doc" includes="*.lyx" />
>   </path>
>   <property name="LYX" refid="lyxfiles" />
> Strip of the suffix with
>   <basename property="PDF" file="${LYX}" suffix=".lyx" />
> And during the copy append the pdf suffix.
> -lakshmi
> Tharp, Joshua L, SOLGV wrote:
>>Ok, so you "know" the source file names with your fileset / mapper
>>combo. So, why not create a fileset that uses the same fileset and
>>mapper to create a fileset of destination (pdf) files. The <copy> can
>>take a fileset for the source files, and you can specify a directory
> for
>>the destination.
>><copy todir="${DSTDOC/${PRJNAME}">
>>    <fileset dir="${APPDOCDIR}" include="*.lyx" />
>>    <mapper type="glob" from="*.lyx" to="*.pdf" />
>>Unless I'm missing something about your environment, this should do
> it.
>>-----Original Message-----
>>From: Lakshmi Vempati [] 
>>Sent: Wednesday, May 28, 2003 8:44 AM
>>To: Ant Users List
>>Subject: Re: Copying specific files
>>I am putting together a generic build so all our
>>projects can use it with the least amount of work.
>>My top level generic build file (which defines all
>>targets etc) assumes a directory structure. For each
>>component that is built it looks for the existence
>>of a 'doc' directory. If it does, it processes all the
>>lyx files in that directory.
>>The lyx files are exported to pdf. Likewise if there are
>>any image files they are exported from eps to pdf.
>>I want to copy only the exported pdf from lyx to the distribution 
>>directory. The command I am using to generate pdf from lyx
>>is as follows:
>><apply dest ="${DSTDOC}/${PRJNAME}"
>>         os="Linux"
>>         dir="${APPDOCDIR}"
>>         executable="lyx"
>>         failifexecutionfails="false">
>>        <arg line="-e pdf2"/>
>>        <srcfile/>
>>        <fileset dir="${APPDOCDIR}" includes="*.lyx" />
>>        <mapper type="glob" from="*.lyx" to="*.pdf" />
>>Though I give a destination directory to the apply task,
>>the generated pdf still gets placed in the project doc directory.
>>This is probably related to the fact that the above lyx command does
>>not take an output directory as argument.
>>So I have to manually copy it to the distribution directory. Since
>>I donot know the exact file names I have to again use the wildcard 
>>fileset to copy all pdfs instead of the one I am interested in.
>>Can I do something different here?
>>Tharp, Joshua L, SOLGV wrote:
>>>How are you specifying the lyx file in the first place?
>>>-----Original Message-----
>>>From: Lakshmi Vempati [] 
>>>Sent: Tuesday, May 27, 2003 12:03 PM
>>>To: Ant Users List
>>>Subject: Re: Copying specific files
>>>Only problem is I donot know the file name.
>>>I am trying to do this generically. If the doc directory
>>>under a project contains a lyx file then I process it
>>>and it's dependent pieces.
>>>To know the specific file name I will have to define a property 
>>>containing the list of one or more lyx files.
>>>I was hoping to find a solution without adding a new property.
>>>Any help is greatly appreciated.
>>>Tharp, Joshua L, SOLGV wrote:
>>>>Just specify "file" and "tofile" instead of "dir" and "todir" in the
>>>>copy task.
>>>>-----Original Message-----
>>>>From: Lakshmi Vempati [] 
>>>>Sent: Thursday, May 22, 2003 1:37 PM
>>>>Subject: Copying specific files 
>>>>I am using the <apply> task to invoke 'lyx' to
>>>>generate a pdf document. In addition, any eps files
>>>>that this lyx document relies on are converted to pdf.
>>>>Finally I want to copy the generated pdf document to the
>>>>distribution directory. Is there any way to do this without
>>>>copying the eps  to pdf converted file?
>>>>To unsubscribe, e-mail:
>>>>For additional commands, e-mail:
>>>>To unsubscribe, e-mail:
>>>>For additional commands, e-mail:

Lakshmi Vempati               
CDM Technologies Inc                    phone:(805) 541 3750 ext 248
San Luis Obispo, CA 93401

View raw message