Re: Custom task invoking other tasks

2006-08-09 Thread Antoine Levy-Lambert
Hello Gili, you can construct your Java task instance in two ways : a) for Ant 1.6 code Java myjava = (Java) getProject().createTask("java"); or b) for Ant 1.7 code Java myjava = new Java(); myjava.bindToOwner(this); myjava.init(); in both cases you need to set afterwards all the attributes

Custom task invoking other tasks

2006-08-09 Thread Tzabari, Gili
Hi, I'd like my custom task to invoke the Java task. Do I simply construct a new instance of org.apache.tools.ant.taskdefs.Java and execute() it? Or is there a nicer convention for chaining tasks programmatically (not in the build.xml side, but rather on the Java end)? Thanks,

Re: how to call ant on optional subdirs?

2006-08-09 Thread Steve Loughran
John Davis wrote: Hello Currently I have a top-level build.xml file which calls ant on subdirs. It looks like something like this: ... I would like to change the xml so it only builds available directories. In other words, if a developer uses this build file, he might not be intere

Re: weird problem with Class instanceOf

2006-08-09 Thread Steve Loughran
wohlgemuth wrote: ok I got it fixed, I had to set the loader ref, kinder annoying and is there an easy way todo this automatical? declare all your stuff as an antlib and types and tasks all get loaded in one go, same classloader. --

RE: Code synchronisation problem

2006-08-09 Thread David Corley \(AT/LMI\)
Hey Stephen, I was actually doing that, but it wasn't working. After much playing around with the code, I discovered that there was in fact classes being created in triplicate! And in differend packages/directory structures to boot. In the end I just used the excludes attribute in the javac

Re: Sshexec task hanging

2006-08-09 Thread Steve Loughran
Brown, Carlton wrote: I've got an sshexec task that never exits, and I need to solicit some opinions on the problem. The reasons behind it are well-known; if an ssh command starts a long-running in the background, then ssh doesn't know when it should exit. From the purist standpoint, this is ex

Re: Javac or Ant issue ?

2006-08-09 Thread Scot P. Floess
I wouldnt use includeswhy are you doing that? Just use srcdir and all your .java's will be found. Chun Ji wrote: Here is my ant target looks like: " ". If you look at my home dir, these files are located as: /home/cji/src/package1/A.java /home/cji/src/package1/B.java /home/cj

RE: Javac or Ant issue ?

2006-08-09 Thread Chun Ji
Here is my ant target looks like: " ". If you look at my home dir, these files are located as: /home/cji/src/package1/A.java /home/cji/src/package1/B.java /home/cji/src/package2/C.java /home/cji/src/package2/D.java /home/cji/src/package3/E.java ... -cji -Original Message

Re: Javac or Ant issue ?

2006-08-09 Thread Alexey N. Solofnenko
ANT compares timestamps of class files with Java source files and passes the list to JavaC command. So, if C and D files are not specified as source files for compilation and selected by JavaC on its own, ANT would not know about them. The situation can happen, if all selected files compiled fi

Re: Javac or Ant issue ?

2006-08-09 Thread Alexey N. Solofnenko
smime.p7s Description: S/MIME Cryptographic Signature

RE: Javac or Ant issue ?

2006-08-09 Thread David Corley \(AT/LMI\)
Have you also checked the latest Ant (1.6.5) changelog? I noticed there was a change to the javac task in 1.6.3 as follows: * Changed default tempdir for from user.dir to java.io.tmpdir. Perhaps this affects you? -Original Message- From: Chun Ji [mailto:[EMAIL PROTECTED] Sent: 09 August

RE: Code synchronisation problem

2006-08-09 Thread Stephen McConnell
> -Original Message- > From: David Corley (AT/LMI) [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 9 August 2006 6:42 PM > To: Ant Users List > Subject: Code synchronisation problem > > Hey, > I have some "hand-written" classes and some > idl-generated source in two seperated direc

Re: Javac or Ant issue ?

2006-08-09 Thread Scot P. Floess
It'd help to see your classpath, sourcepath, etc... It sounds like those are in issue. Chun Ji wrote: I have noticed some very strange behaviour when I try to compile my java code. Say I have some java files to be filed, A,B,C,D,E,F,G... When I was doing a clean compiling, it gives me error t

Re: doesn't work for ASCII art

2006-08-09 Thread Dominique Devienne
Since leading whitespace may be stripped from your ASCII art, simply prepend each line with a little dot '.' (possibly followed by spaces), to work around the issue. The dots shouldn't affect the visual effect. --DD On 8/9/06, Hans Schwaebli <[EMAIL PROTECTED]> wrote: You mean "when not using AS

Re: doesn't work for ASCII art

2006-08-09 Thread Hans Schwaebli
You mean "when not using ASCII art", because of that "feature"... Gilbert Rebhan <[EMAIL PROTECTED]> wrote: Hi, don't worry it's also in Eclipse 3.2 :-),which i use I wouldn't call it a bug, it's enough if you know that behaviour when using ascii art ;-) Gilbert Hans Schwaebli wrote: > Yes, I

Javac or Ant issue ?

2006-08-09 Thread Chun Ji
I have noticed some very strange behaviour when I try to compile my java code. Say I have some java files to be filed, A,B,C,D,E,F,G... When I was doing a clean compiling, it gives me error that File C, D failed because some errors, which is true. But when I do the compile(not a clean compile)

Re: doesn't work for ASCII art

2006-08-09 Thread Gilbert Rebhan
Hi, don't worry it's also in Eclipse 3.2 :-),which i use I wouldn't call it a bug, it's enough if you know that behaviour when using ascii art ;-) Gilbert Hans Schwaebli wrote: > Yes, I use Eclipse. > > Thanks for the information you found. > > I will check why Eclipse 3.1.2 is doing this str

Re: weird class problem the second - can't find org.jnp.interfaces.NamingContextFactory

2006-08-09 Thread wohlgemuth
ok I found an ugly solution but it works. basicly in my taks I create an instance of the java task and give it the reference to the classpath + plus the needed parameter. public void execute() throws BuildException { try { Java java = new Java();

RE: doesn't work for ASCII art

2006-08-09 Thread Hans Schwaebli
I now believe it is because of Eclipse. Tomorrow I will test it. By the way, I want to use this ASCII art: ,-._.-._.-._.-._.-. `-. ,-' .--. | | || |

RE: doesn't work for ASCII art

2006-08-09 Thread Hans Schwaebli
Yes, I use Eclipse. Thanks for the information you found. I will check why Eclipse 3.1.2 is doing this strange thing. Maybe a bug. "Rebhan, Gilbert" <[EMAIL PROTECTED]> wrote: OK, i see, you have probs with leading spaces i think i have hit the problem i tried with -

Re: weird class problem the second - can't find org.jnp.interfaces.NamingContextFactory

2006-08-09 Thread wohlgemuth
sofar I found out that the problem is located in the ant classpath, If I copy all my libs into the ant lib directory everything is working fine. It's just there need to be an easier way, cause I can't force the user of this software to always copy the nearly 50 libs into there ant directory. any

RE: Custom Task that exports a property

2006-08-09 Thread Tzabari, Gili
Sorry but how do I invoke the task from within my custom task? You guys said to use but I'm not clear on how to do this using the programmatic API (as opposed to embedding code in the build.xml file). Thanks, Gili -Original Message- From: Rebhan, Gilbert [mailto:[EMAIL PROTECTED

RE: doesn't work for ASCII art

2006-08-09 Thread Rebhan, Gilbert
forget the line ... then you do not need to go the way via multilineproperty and wrap every line between \n ... \ = ... not needed when using i once had a problem when generating a property file and java has the convention with \n line \ when it comes to multiline properties ... so you may

RE: doesn't work for ASCII art

2006-08-09 Thread Rebhan, Gilbert
you may also go with concat, as Jan already mentioned, then you do not need to go the way via multilineproperty and wrap every line betwenn \n ... \ = when no destfile attribute specified it appears on stdout result = [concat] Bla bluer [concat]

RE: doesn't work for ASCII art

2006-08-09 Thread Rebhan, Gilbert
OK, i see, you have probs with leading spaces i think i have hit the problem i tried with --- Bla bluer asda ASDF 12345678 asdf --- and = ${bla} ech o 1 echo

Re: how to call ant on optional subdirs?

2006-08-09 Thread Scot P. Floess
I suppose you could do something with and set properties, then use targets with a if attribute... That would be somewhat kludgy... Honestly, the ant-contrib solution would be cleaner... wohlgemuth wrote: is suggest you use the if/else task and check if the dir exist in the first place? thi

Re: doesn't work for ASCII art

2006-08-09 Thread James Abley
Sorry, I can't reproduce (or misunderstand?) your problem. This works fine for me (hopefully the formatting will not be stripped out): this here what about this? [EMAIL PROTECTED] ant -e Buildfile: build.xml test: this here what about this? this

weird class problem the second - can't find org.jnp.interfaces.NamingContextFactory

2006-08-09 Thread wohlgemuth
hi I try to call an ejb from an ant task and get always: [register] (util.RocksClusterFactoryImpl50 ) create new implementation of the cluster util [register] javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java

Re: doesn't work for ASCII art

2006-08-09 Thread Hans Schwaebli
Doesn't work to solve the problem. James Abley <[EMAIL PROTECTED]> wrote: CDATA? Hans Schwaebli wrote: > Doesn't work. Same effect. > > Lets say you have three spaces in a row. They are all trimmed. > > > "Rebhan, Gilbert" wrote: > > Yup > > there is a task = > > first load the file as a

Re: AW: doesn't work for ASCII art

2006-08-09 Thread Hans Schwaebli
Doesn't work to solve the problem. [EMAIL PROTECTED] wrote: ... or when using external text files (not property-file) ... Jan >-Ursprüngliche Nachricht- >Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Gesendet: Mittwoch, 9. August 2006 12:17 >An: user@ant.apache.org >Bet

Re: how to call ant on optional subdirs?

2006-08-09 Thread wohlgemuth
is suggest you use the if/else task and check if the dir exist in the first place? this should solve your problem. http://ant-contrib.sourceforge.net/tasks/tasks/if.html /gert On 8/8/06, John Davis <[EMAIL PROTECTED]> wrote: Hello Currently I have a top-level build.xml file which calls ant

Re: weird problem with Class instanceOf

2006-08-09 Thread wohlgemuth
ok I got it fixed, I had to set the loader ref, kinder annoying and is there an easy way todo this automatical? thx for your help and pointing me in the right direction! final soloutioon: On 8/9/06, wohlgemuth <[E

Re: weird problem with Class instanceOf

2006-08-09 Thread wohlgemuth
ok good shot, they have differenct hashcodes now how do I fix this? my complete ant task looks like:

RE: doesn't work for ASCII art

2006-08-09 Thread Hans Schwaebli
Try it with adgl sdfsdf The result will be adgl sdfsdf "Rebhan, Gilbert" <[EMAIL PROTECTED]> wrote: Hm, i've tried with a txtfile like that : Bla bluer asda ASDF 12345678 asdf and : ${bla}

AW: doesn't work for ASCII art

2006-08-09 Thread Jan.Materne
... or when using external text files (not property-file) ... Jan >-Ursprüngliche Nachricht- >Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Gesendet: Mittwoch, 9. August 2006 12:17 >An: user@ant.apache.org >Betreff: AW: doesn't work for ASCII art > >---8-<---8-<---8

AW: doesn't work for ASCII art

2006-08-09 Thread Jan.Materne
---8-<---8-<---8-<---8-<---8-<---8-<---8-<---8-< line1 line4-indented line5 ---8-<---8-<---8-<---8-<---8-<---8-<---8-<---8-< C:\TEMP>ant -f build-asciiart.xml Buildfile: build-asciiart.xml [echo]

RE: doesn't work for ASCII art

2006-08-09 Thread Rebhan, Gilbert
Hm, i've tried with a txtfile like that : Bla bluer asda ASDF 12345678 asdf and : ${bla} gives me = [echo] Bla bluer [echo] [echo] [echo] asda [echo] ASDF [echo] 12345678 [echo]

AW: Code synchronisation problem

2006-08-09 Thread Jan.Materne
My first thought is trying some kind of . But what happens if you change the IDL? Do you implement the IDL-changes by hand? It's a common "problem" of merging manual-written and generated code in MDSD (I see the IDL as a model here). Jan >-Ursprüngliche Nachricht- >Von: David Corley

Re: doesn't work for ASCII art

2006-08-09 Thread James Abley
CDATA? Hans Schwaebli wrote: Doesn't work. Same effect. Lets say you have three spaces in a row. They are all trimmed. "Rebhan, Gilbert" <[EMAIL PROTECTED]> wrote: Yup there is a task = first load the file as a property : ... and later echo the property ${bla} btw af

RE: doesn't work for ASCII art

2006-08-09 Thread Hans Schwaebli
Doesn't work. Same effect. Lets say you have three spaces in a row. They are all trimmed. "Rebhan, Gilbert" <[EMAIL PROTECTED]> wrote: Yup there is a task = first load the file as a property : ... and later echo the property ${bla} btw after reading your first mail a seco

Code synchronisation problem

2006-08-09 Thread David Corley \(AT/LMI\)
Hey, I have some "hand-written" classes and some idl-generated source in two seperated directories. Some of the source in both of the directories has the same file/class name, and as I need to compile them together, I get "duplicate class" errors. What I would like to do is compare the "ha

RE: doesn't work for ASCII art

2006-08-09 Thread Rebhan, Gilbert
Yup there is a task = first load the file as a property : ... and later echo the property ${bla} btw after reading your first mail a second time = i first thought you had probs with linefeeds, but you wrote "multiple spaces are trimmed" why are spaces trimmed when using ???

RE: doesn't work for ASCII art

2006-08-09 Thread Hans Schwaebli
Or is there a task to print the contents of a text file (not trimming spaces)? "Rebhan, Gilbert" <[EMAIL PROTECTED]> wrote: hm, maybe you could use a multilineproperty the format has to be written like that = myasciiart=\n line0 \ \n line1 \ \n line2 \ \n line3 \ \n line4 \ \n line5 \ \n

RE: doesn't work for ASCII art

2006-08-09 Thread Rebhan, Gilbert
hm, maybe you could use a multilineproperty the format has to be written like that = myasciiart=\n line0 \ \n line1 \ \n line2 \ \n line3 \ \n line4 \ \n line5 \ \n line6 \ you have to wrap every line of your ascii art between \n and \ and then ${myasciiart} Regards, Gilbert -Origina

doesn't work for ASCII art

2006-08-09 Thread Hans Schwaebli
I want to echo ASCII art. But since multiple spaces are trimmed, it does not work. How can I do it? - Yahoo! Music Unlimited - Access over 1 million songs.Try it free.

Re: binary Diff. with ANT?

2006-08-09 Thread heisch
Hi, I have solution for that: The fileset-Tag has the element ... How it works: The tag selects files who are deemed to be 'different' from another, equivalent file in another location. The rules for determining difference between two files are as follows: 1. If there is no 'other' file, it