ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Gardner <Dan.Gard...@emap.com>
Subject RE: copy,fileset,mapper
Date Thu, 30 Jan 2003 19:24:53 GMT
I originally thought the mapper would do it, but now I've formed the opinion
(hopefully wrongly) that the mapper will just change the file name during a
copy of move routine.

I need to identify a file list.
Change that filelist.
Use the changed filelist as the definition of my source files.

I think I can do what I want using 
1	a pathconvert, with a map element to change the directory location.

2	Then write to a file.
3	Use the replace task to change the .java to .class
4	read it back in

_______________________________
Dan Gardner        Emap IT - UK



>-----Original Message-----
>From: Dominique Devienne [mailto:DDevienne@lgc.com]
>Sent: 30 January 2003 19:06
>To: 'Ant Users List'
>Subject: RE: copy,fileset,mapper
>
>
>Sounds like a job for something along the lines of:
>
><property name="builddir" location="build" />
><property name="patchsrc" location="source/patch_1" />
><copy todir="patches/patch-directory">
>  <fileset dir="${patchsrc}">
>    <include name="**/*.java" />
>    <depend targetdir="other source dir" />
>  </fileset>
>  <mapper type="regexp" from="${patchsrc}(.*)\.java"
>                        to="${builddir}\1.class" />
></copy>
>
>but since I'm not sure I followed you, I might be off. --DD
>
>-----Original Message-----
>From: Dan Gardner [mailto:Dan.Gardner@emap.com] 
>Sent: Thursday, January 30, 2003 12:18 PM
>To: 'Ant Users List'
>Subject: copy,fileset,mapper
>
>I'm having trouble doing the following.
>
>1	Identify a list of changed .java files in a 
>source/patch-directory.
>This is a subset of the complete list for the release.
>2	Use that list to copy the *relevant* resultant .class 
>files in the
>build area into a patches/patch-directory.
>
>I was hoping I could do the following:
>
>1	identify the changed .java files with a fileset [yes]
>/source/patch_1/com/bla/foo.java
>/source/patch_1/com/bla/bar.java
>
>2	pathconvert the fileset into a property containing the 
>files as a
>comma separated list.  Apply a map within the pathconvert to change the
>directory location from the source directory to the build directory.
>${filelist}=/build/com/bla/foo.java,/build/com/bla/foo.java
>
>3	replace the *.java extension with *.class somehow {shrug}
>${filelist}=/build/com/bla/foo.class,/build/com/bla/foo.class
>
>4	use this as a fileset includes entry to copy the changed .class
>files into a patch directory.
>
>
>I'm starting to hit a wall on this one.  Any ideas ?
>cheers
>dan
>
>_______________________________
>Dan Gardner        Emap IT - UK
>
>
>** For great Emap magazine subscription & gift offers visit
>http://www.emapmagazines.co.uk **
>
>---------------------------------------------------------------
>-------------
>----
>The information in this email is intended only for the 
>addressee(s) named
>above.
>Access to this email by anyone else is unauthorised.
>If you are not the intended recipient of this message any disclosure,
>copying, 
>distribution or any action taken in reliance on it is 
>prohibited and may be
>unlawful. 
>
>Emap plc and or its subsidiaries do not warrant that any 
>attachments are
>free from 
>viruses or other defects and accept no liability for any 
>losses resulting
>from 
>infected email transmissions.
>
>Please note that any views expressed in this email may be those of the
>originator 
>and do not necessarily reflect those of this organisation.
>---------------------------------------------------------------
>-------------
>----
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ant-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: ant-user-help@jakarta.apache.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ant-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: ant-user-help@jakarta.apache.org
>


** For great Emap magazine subscription & gift offers visit http://www.emapmagazines.co.uk
**

--------------------------------------------------------------------------------
The information in this email is intended only for the addressee(s) named above.
Access to this email by anyone else is unauthorised.
If you are not the intended recipient of this message any disclosure, copying, 
distribution or any action taken in reliance on it is prohibited and may be unlawful. 

Emap plc and or its subsidiaries do not warrant that any attachments are free from 
viruses or other defects and accept no liability for any losses resulting from 
infected email transmissions.

Please note that any views expressed in this email may be those of the originator 
and do not necessarily reflect those of this organisation.
--------------------------------------------------------------------------------


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


Mime
View raw message