ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tharp, Joshua L, SOLGV" <>
Subject RE: Copying specific files
Date Wed, 28 May 2003 18:41:54 GMT
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}"
        <arg line="-e pdf2"/>
        <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.
> -Lakshmi
> 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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message