Re: Filter on copy with directory contents

2008-02-20 Thread Paul J. Lucas
On Feb 20, 2008, at 4:48 PM, Martin Gainty wrote: Here is the source for input.java Uhm... look: I suppose I appreciate that some effort is being undertaken, but: 1. The source-code you pasted is unreadable as-is. 2. Again, I'm looking for an all-ant solution. If ant isn't powerful eno

Re: Filter on copy with directory contents

2008-02-20 Thread Martin Gainty
Here is the source for input.javaimport java.lang.*;import java.io.*;public class input{ public static void main(String args[]) { BufferedWriter writer=null; try { String replacement_strings[]={"foo.jar","bar.jar"

Filter on copy with directory contents

2008-02-20 Thread Paul J. Lucas
Given a file that contains: @REPLACEME@ I want to use to copy the file and replace @REPLACEME@ with contents like: foo.jar bar.jar ... where "foo" and "bar" are the names of the file(s) in a particular directory that match a certain pattern (in this case *

Re: problems creating a jar

2008-02-20 Thread Steve Loughran
Dimitris Mouchritsas wrote: Steve Loughran wrote: Steve, creating a tmp dir to create a complicated structure inside a jar file is the recommended approach? Is there a better way to do it? If the tmp dir is the way to go I suppose it's best not to delete this dir, except on a "clean" buil

Re: problems creating a jar

2008-02-20 Thread Dimitris Mouchritsas
Steve Loughran wrote: Luca Ferrari wrote: On Wednesday 20 February 2008 Dimitris Mouchritsas's cat, walking on the keyboard, wrote: So for example you create: /dist tmp/ classes/ img/ lib/ and then you etc. But in this case into the jar I will have also the classes dire

Re: problems creating a jar

2008-02-20 Thread Steve Loughran
Luca Ferrari wrote: On Wednesday 20 February 2008 Dimitris Mouchritsas's cat, walking on the keyboard, wrote: So for example you create: /dist tmp/ classes/ img/ lib/ and then you etc. But in this case into the jar I will have also the classes directory, while it should

Re: problems creating a jar

2008-02-20 Thread Luca Ferrari
On Wednesday 20 February 2008 Dimitris Mouchritsas's cat, walking on the keyboard, wrote: > So for example you create: > /dist >tmp/ > classes/ > img/ > lib/ > > and then you basedir="${dist.dir}/tmp/"> etc. But in this case into the jar I will have also the classes directo

RE: Can Ant Edit/replace some words in a file

2008-02-20 Thread Sann Maung
Hi, Thanks for the warning. I will read it. Right now I can do it on my Windows. But later I wish to try on Linux. But I saw a note saying that the file permissions will not be retained and end up with default UMASK and suggest to wrote: > Ouch, that was vague Sorry, not trying to > fearmon

RE: Can Ant Edit/replace some words in a file

2008-02-20 Thread Sann Maung
Hi, Thanks for your warning. My editing is only for some simple keywords only. rgds, --- Alec Fernandez <[EMAIL PROTECTED]> wrote: > Just be careful if you are using > filterchain/filterreplace on binary files. Encoding > issues can end up transcoding some bytes in binary > files. Much has

Re: AW: Can Ant Edit/replace some words in a file

2008-02-20 Thread Sann Maung
Hi, Danke. Thanks a lot for your prompt reply. It works. rgds, --- [EMAIL PROTECTED] wrote: > > > > > Jan > > > -Ursprüngliche Nachricht- > > Von: Sann Maung [mailto:[EMAIL PROTECTED] > > Gesendet: Mittwoch, 20. Februar 2008 14:30 > > An: Ant Users List > > Betreff: Can

RE: Can Ant Edit/replace some words in a file

2008-02-20 Thread Alec Fernandez
Ouch, that was vague Sorry, not trying to fearmonger here. Here is the reference, look for the important encoding note. Seems obvious in retrospect, but it snuck up on me despite my prior belief that I was semi-aware of transcoding issues :-) http://ant.apache.org/manual/CoreTasks/copy.htm

Re: Can Ant Edit/replace some words in a file

2008-02-20 Thread Dimitris Mouchritsas
Alec Fernandez wrote: Just be careful if you are using filterchain/filterreplace on binary files. Encoding issues can end up transcoding some bytes in binary files. Much has been written on this topic and I would pay close attention. -alec -Original Message- From: [EMAIL PROTECTED]

RE: Can Ant Edit/replace some words in a file

2008-02-20 Thread Alec Fernandez
Just be careful if you are using filterchain/filterreplace on binary files. Encoding issues can end up transcoding some bytes in binary files. Much has been written on this topic and I would pay close attention. -alec -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED

AW: Can Ant Edit/replace some words in a file

2008-02-20 Thread Jan.Materne
Jan > -Ursprüngliche Nachricht- > Von: Sann Maung [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 20. Februar 2008 14:30 > An: Ant Users List > Betreff: Can Ant Edit/replace some words in a file > > Hi, > > I am using Ant to copy some files (eg. program files > like template prog

Can Ant Edit/replace some words in a file

2008-02-20 Thread Sann Maung
Hi, I am using Ant to copy some files (eg. program files like template program). Then I want to replace some keywords inside the file with another word. Can I use Ant to do it? If possible please guide me. What I am thinking is to change the words with (sed) and use Ant to run that (sed). But

Re: problems creating a jar

2008-02-20 Thread Dimitris Mouchritsas
Luca Ferrari wrote: Hi guys, I've got a problem creating a buildfile for a project of mine, where I'd like also to build a jar as final step. This is source tree: projectRoot +src // java sources +srcTest // junit sources +img // ico

problems creating a jar

2008-02-20 Thread Luca Ferrari
Hi guys, I've got a problem creating a buildfile for a project of mine, where I'd like also to build a jar as final step. This is source tree: projectRoot +src // java sources +srcTest // junit sources +img // icons +lib

Re: How do you check jar and zip are not corrupted

2008-02-20 Thread Marc Farrow
also depending on environment it might be better to FTP instead of COPY. On Feb 20, 2008 7:24 AM, Steve Loughran <[EMAIL PROTECTED]> wrote: > Ramu Sethu wrote: > > Hi all > > > > I copy files from a m/c thro copy task. These jars and zip files will be > > used in my class path for the next build

Re: How do you check jar and zip are not corrupted

2008-02-20 Thread Steve Loughran
Ramu Sethu wrote: Hi all I copy files from a m/c thro copy task. These jars and zip files will be used in my class path for the next build (which run junit tests). All these process are scheduled. But sometimes file copied gets corrupted or not copied properly. All my tests in my next build fail

How to append to target file name in apply with mapper.

2008-02-20 Thread Raja Nagendra Kumar
Hi, I want to use apply with a different destination directory and target file name. To this regard could any tell me how to access the targetfile and source file as property after the following mapping happen e.g if a.exe takes src and dst file then I would like to have some thing