RE: Custom Task that exports a property

2006-08-09 Thread Rebhan, Gilbert
Hi, beside = project.setNewProperty() for a really new property there's also = project.setProperty() - with that method you can reset/overwrite an existing property if you need to btw you can always use such methods with script task, you don't always need a new task, f.e. property name=FOO

Re: binary Diff. with ANT?

2006-08-09 Thread heisch
Hi, I have solution for that: The fileset-Tag has the element different... How it works: The different 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

echo 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: echo 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 echo${myasciiart}/echo Regards, Gilbert

RE: echo 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

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

RE: echo 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 second

Re: echo 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 after

RE: echo 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 : loadfile property=bla srcfile=y:/test2.txt/ target name=depends echo${bla}/echo /target gives me = [echo] Bla bluer [echo]

AW: echo doesn't work for ASCII art

2006-08-09 Thread Jan.Materne
---88888888- project echo line1 line4-indented line5 /echo /project ---88888888- C:\TEMPant -f build-asciiart.xml Buildfile: build-asciiart.xml

AW: echo doesn't work for ASCII art

2006-08-09 Thread Jan.Materne
... or when using external text files (not property-file) ... project concatfileset dir=. includes=asciiart.txt//concat /project Jan -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 9. August 2006 12:17 An: user@ant.apache.org Betreff:

RE: echo 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}

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: project name=antTaskExample default=example !-- define our classpath -- path id=lib pathelement path=../../build / fileset dir=../../lib

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: path id=lib pathelement path=../../build / fileset dir=../../lib

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: AW: echo 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

Re: echo 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 property :

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

Re: how to call ant on optional subdirs?

2006-08-09 Thread Scot P. Floess
I suppose you could do something with available 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

RE: echo 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 = loadfile property=bla srcfile=y:/test2.txt/ target name=depends

RE: echo 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 ... \ = concat fileset dir=Y: includes=test2.txt/ /concat when no destfile attribute specified it appears on stdout result = [concat]

RE: echo 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 loadfile property= ... i once had a problem when generating a property file and java has the convention with \n line \ when it comes to multiline

RE: Custom Task that exports a property

2006-08-09 Thread Tzabari, Gili
Sorry but how do I invoke the java task from within my custom task? You guys said to use antcall 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

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.

RE: echo 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: echo 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: 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: echo 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 strange

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

Re: echo 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 use

Re: echo 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

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

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 directories.

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 javac from user.dir to java.io.tmpdir. Perhaps this affects you? -Original Message- From: Chun Ji [mailto:[EMAIL PROTECTED] Sent: 09

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 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

RE: Javac or Ant issue ?

2006-08-09 Thread Chun Ji
Here is my ant target looks like: target name=build javac srcdir=/home/cji/src destdir=${classes} debug=${debug} optimize={optimize} includes=package1/A.java, package1/B.java, package2/C.java, package2/D.java, package3/E.java, ...; classpath

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: target name=build javac srcdir=/home/cji/src destdir=${classes} debug=${debug} optimize={optimize}

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

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: target name=top_build depends=... ant dir=tools/ ant dir=src / ant dir=tests / ... /target I would like to change the xml so it only builds available

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: 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