Hello,
Your code seems ok. Ypu may want to start ant with
-verbose option to see what is going wrong.
Also can you try defining master_base property not
with value but with location attribute:
<property name="master_base"
location="c:\StarTeam\MyProject\release"/>
Regards
Ivan
--- "Guttula, Mohan" <MGuttula@tiaa-cref.org> wrote:
> More info:
>
> If I don't use <globmapper>, I'm getting the
> complete path of the files
> inside my target file. If I use the <globmapper>,
> the target file is
> empty.
>
> A snippet of my build.xml
> ----
> <?xml version="1.0" encoding="UTF-8" ?>
> <project basedir="." name="baseProject"
> default="help">
>
> <property name="master_base"
> value="c:\StarTeam\MyProject\release"/>
>
>
> <target name="masterlist">
> <fileset dir="${master_base}" id="all.files.fs">
> <include name="**/*"/>
> </fileset>
> <pathconvert property="all.files"
> pathsep="${line.separator}" refid="all.files.fs">
> <globmapper
> from="${master_base}${file.separator}*" to="*"/>
> </pathconvert>
> <echo file="master.sql">${all.files}</echo>
> </target>
>
> </project>
> ----
>
> Regards,
> Mohan
>
> -----Original Message-----
> From: Guttula, Mohan
> Sent: Wednesday, April 19, 2006 3:35 PM
> To: Ant Users List
> Subject: RE: Create a file that contains files in
> directory
>
> Hello,
>
> <globmapper> didn't resolve the absolute path issue?
> Do I need to use some other mapper?
>
> Regards,
> Mohan
>
> -----Original Message-----
> From: Ivan "Rambius" Ivanov
> [mailto:rambiusparkisanius@yahoo.com]
> Sent: Monday, April 17, 2006 4:58 PM
> To: Ant Users List
> Subject: Re: Create a file that contains files in
> directory
>
> Hello,
>
> Here is a sample script that does this:
>
> <project>
> <fileset dir="${basedir}" id="all.files.fs">
> <include name="**/*"/>
> </fileset>
> <pathconvert property="all.files"
> pathsep="${line.separator}"
> refid="all.files.fs"/>
> <echo file="allfiles.txt">${all.files}</echo>
> </project>
>
> Note that allfiles.txt will contain the absolute
> locations of the files. If you need relative ones
> you
> may want to use mappers:
>
> <pathconvert property="all.files"
> pathsep="${line.separator}"
> refid="all.files.fs">
> <globmapper
> from="${basedir}${file.separator}*" to="*"/>
> </pathconvert>
>
> Regards
> Ivan
>
> --- "Guttula, Mohan" <MGuttula@tiaa-cref.org> wrote:
>
> > Hello All,
> >
> >
> >
> > I need to generate a file that contains list of
> > files from a directory
> > (that will contain subdirectories).
> >
> > Something similar to copying the output of "ls" or
> > "dir" to a file.
> >
> >
> >
> > For example:
> >
> > Folder "temp" contains folders "temp1", "temp2",
> and
> > a file "temp.tab"
> >
> > Folder "temp1" contains folder temp3 and file
> > "temp1.ind"
> >
> > Folder "temp2" contains folder temp4 and file
> > "temp2.trg"
> >
> > Folder "temp3" contains file "temp3.seq"
> >
> > Folder "temp4" contains file "temp4.fn"
> >
> >
> >
> > I need to generate a file which contains the
> > following contents:
> >
> > ----
> >
> > temp/temp.tab
> >
> > temp1/temp1.ind
> >
> > temp2/temp2.trg
> >
> > temp3/temp3.seq
> >
> > temp4/temp4.fn
> >
> > ----
> >
> >
> >
> > Note: Contents of "temp" folder changes during
> each
> > checkout from Source
> > code control.
> >
> >
> >
> > Thanks,
> >
> > Mohan
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
**************************************************************
> > This message, including any attachments, contains
> > confidential information intended for a specific
> > individual and purpose, and is protected by law.
> If
> > you are not the intended recipient, please contact
> > sender immediately by reply e-mail and destroy all
> > copies. You are hereby notified that any
> > disclosure, copying, or distribution of this
> > message, or the taking of any action based on it,
> is
> > strictly prohibited.
> > TIAA-CREF
> >
>
**************************************************************
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>
>
>
>
**************************************************************
> This message, including any attachments, contains
> confidential
> information intended for a specific individual and
> purpose, and is
> protected by law. If you are not the intended
> recipient,
=== message truncated ===
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
|