RE: Task help

2006-10-18 Thread Rebhan, Gilbert
sorry, it's enough to reference the namespace if antcontrib.jar is in ANT_HOME/lib directory so you could either put antcontrib in its own namespace = and ... or without ancontrib in own namepsace = and ... <:for> Regards, Gilbert -Original Message- From: Rebhan, Gilbert

RE: Task help

2006-10-18 Thread Rebhan, Gilbert
Hi, you forgot to reference the namespace = beside = to make = ... work. also i would use antcontrib 1.0b2 instead of the old 0.6 Regards, Gilbert -Original Message- From: bill/wilandra [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 18, 2006 10:49 PM To: 'Ant Users

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Joel Klein
Steve Loughran wrote: 1. I dont like all the extra typing you need everywhere; it makes things more verbose. What is wrong with polymorphic type inference? I'd like to know the story on type inference for Java too, though it is probably more a question for the Types mailing list (http://lists.s

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Steve Loughran
Chavdar Botev wrote: Peter Reilly wrote: The original code may be slightly incorrect (my understanding of java generics is not high). Ha-ha. I think the original code cannot be slightly incorrect. It is either correct or incorrect. ;) It certainly possible that my understanding of Java generics

Re: How to dump heap on OutOfMemoryError from ant

2006-10-18 Thread Steve Loughran
Milan Kubec wrote: Hello, I want ant to generate heap dump when OutOfMemoryError happens during the build to find the problem in the task. I tried adding following switches to .antrc file: -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=e:\ant.hprof But it doesn't seem to get to the correct p

Re: Delete Directory Matching A Pattern

2006-10-18 Thread Matt Benson
--- "Sean (Xuong) Phu" <[EMAIL PROTECTED]> wrote: > Is there a way to delete a set of directories and > subdirectories matching a pattern? > For example, I want to delete "blah1234" and > "blahabcdefg" since they both begins with "blah". > > I tried to use the following to delete any directory >

Re: How to dump heap on OutOfMemoryError from ant

2006-10-18 Thread Sean \(Xuong\) Phu
try updating the ant shell/batch file. I am using 1.6.2 in Windows, so looking at \apache-ant-1.6.2\bin\ant.bat this is what I would do (see where I place your -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=e:\ant.hprof): :runAnt if not "%CLASSPATH%"=="" goto runAntWithClasspath "%_JAVACMD%"

How to dump heap on OutOfMemoryError from ant

2006-10-18 Thread Milan Kubec
Hello, I want ant to generate heap dump when OutOfMemoryError happens during the build to find the problem in the task. I tried adding following switches to .antrc file: -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=e:\ant.hprof But it doesn't seem to get to the correct process, in other word

Delete Directory Matching A Pattern

2006-10-18 Thread Sean \(Xuong\) Phu
Is there a way to delete a set of directories and subdirectories matching a pattern? For example, I want to delete "blah1234" and "blahabcdefg" since they both begins with "blah". I tried to use the following to delete any directory named with "blah*", but it didn't work.

RE: Task help

2006-10-18 Thread bill/wilandra
Try this taskdef instead and see if it helps: HTH Bill -Original Message- From: Muthyala, Sunil [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 18, 2006 11:23 AM To: 'Ant Users List' Subject: RE: Task help Thanks to Jan and Steve Loughran. I tried Jan's suggestion, I get an error

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Chavdar Botev
TWIMC, I know I am a bit into the gray cross-posting area but here is the thread I started on the Java Forums: http://forum.java.sun.com/thread.jspa?threadID=778203. Chavdar - To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

RE: Task help

2006-10-18 Thread Muthyala, Sunil
Thanks to Jan and Steve Loughran. I tried Jan's suggestion, I get an error I downloaded the Ant-contrib-0.6.jar and dropped it in ant/lib directory and included the in build.xml. Here is the build.xml @{file} -- This is the e

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Scot P. Floess
Ha-ha. I think the original code cannot be slightly incorrect. It is either correct or incorrect. ;) It certainly possible that my understanding of Java generics is wrong. I come from a C++ templates background and although syntactically similar, Java generics and C++ templates seem to be very d

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread James Abley
Chavdar Botev wrote: Peter Reilly wrote: The original code may be slightly incorrect (my understanding of java generics is not high). Ha-ha. I think the original code cannot be slightly incorrect. It is either correct or incorrect. ;) It certainly possible that my understanding of Java generics

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Chavdar Botev
Peter Reilly wrote: The original code may be slightly incorrect (my understanding of java generics is not high). Ha-ha. I think the original code cannot be slightly incorrect. It is either correct or incorrect. ;) It certainly possible that my understanding of Java generics is wrong. I come from

Re: path performance

2006-10-18 Thread Peter Reilly
On 10/18/06, Kevin Cline <[EMAIL PROTECTED]> wrote: On 10/18/06, Dominique Devienne <[EMAIL PROTECTED]> wrote: > > > Timing indicates that ant is spending 30 seconds per test to walk the > lib > > tree building the classpath. Does anyone have a solution to this > problem? > > Frankly, that sound

Re: path performance

2006-10-18 Thread Kevin Cline
On 10/18/06, Dominique Devienne <[EMAIL PROTECTED]> wrote: > Timing indicates that ant is spending 30 seconds per test to walk the lib > tree building the classpath. Does anyone have a solution to this problem? Frankly, that sounds a bit fishy ;-) Unless your hierarchy is exceedingly large

Re: path performance

2006-10-18 Thread Dominique Devienne
Timing indicates that ant is spending 30 seconds per test to walk the lib tree building the classpath. Does anyone have a solution to this problem? Frankly, that sounds a bit fishy ;-) Unless your hierarchy is exceedingly large in ${lib.dir}, it's unlikely it's the fileset scan that's taking so

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Scot P. Floess
And, regarding generics...as for value - wow...how many heterogenous collections did we ever really use in pre 1.5 code? Most of my collections always contained homogeneous data. So, having generics now certainly improves readability (yes I know, under the covers it does the casts for me)...

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Scot P. Floess
Sorry let me clarify... The comment was "The original code may be slightly incorrect (my understanding of java generics is not high)." And the response was "Me too. I don't like STL!" I do realize STL is built using generics.The Standard Template Library defines templates...but STL in and

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread James Abley
Scot P. Floess wrote: What do generics have to do with STL? You're joking, right? Have you used the STL much? Generics are very very handy :) Maybe. I live in a world where the majority of my code has to work on pre-Java 5, and for code where I can use Java 5 features, generics don't seem

Re: path performance

2006-10-18 Thread Kevin Cline
On 10/18/06, David Corley (AT/LMI) <[EMAIL PROTECTED]> wrote: Hey Kevin, If you put all of your tests into a Junit testsuite, and use the paremeter of the task, junit will load the classpath once and use it for all tests. Sometimes this isn't possible because of dependency issues betwe

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Scot P. Floess
What do generics have to do with STL? Generics are very very handy :) James Abley wrote: Peter Reilly wrote: The original code may be slightly incorrect (my understanding of java generics is not high). Me too. I don't like STL! James

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Scot P. Floess
Peter: Point well taken. The problem here, I think, is that the inner class has access to everything defined in the outer class (this includes the declaration of the generic). Of course, javac comes in and does some creative compiling to make that possible. Personally, I strive very hard t

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread James Abley
Peter Reilly wrote: The original code may be slightly incorrect (my understanding of java generics is not high). Me too. I don't like STL! James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EM

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Peter Reilly
The original code may be slightly incorrect (my understanding of java generics is not high). Test1.java is defined as: public class Test1 { public class Inner1 { protected T v; public Inner1(T v) {this.v = v;} public T getV() {return this.v;}

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Scot P. Floess
Actually, I think the real problem isn't generics but an inner class that using a generic specified by the outer class. I bet this problem goes away if all the classes were defined as outer classes. Steve Loughran wrote: Scot P. Floess wrote: Steve: My apologies...my mouth is now stretched

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Steve Loughran
Scot P. Floess wrote: Steve: My apologies...my mouth is now stretched from the placement of my foot in my mouth ;) When I tried this, I didn't specify -classpath to command line javac. I see now by doing so it does, in fact, break as mentioned. Yeah, I agree (now) that it is a bug :) Or

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Scot P. Floess
Steve: My apologies...my mouth is now stretched from the placement of my foot in my mouth ;) When I tried this, I didn't specify -classpath to command line javac. I see now by doing so it does, in fact, break as mentioned. Yeah, I agree (now) that it is a bug :) Scot Steve Loughran wrote

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Steve Loughran
Scot P. Floess wrote: How is this a java generics bug? I specifically was able to compile just Test3.java using command line javac... So its not javac nor is it a generics problem. we can replicate it on the command line, just by adding the .class file to the classpath. That's why its a co

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Scot P. Floess
How is this a java generics bug? I specifically was able to compile just Test3.java using command line javac... So its not javac nor is it a generics problem. It is probably needed for incremental builds in which all source files are not in the source tree you specify, such as when you have

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Peter Reilly
On 10/18/06, Steve Loughran <[EMAIL PROTECTED]> wrote: Peter Reilly wrote: > On 10/17/06, Chavdar Botev <[EMAIL PROTECTED]> wrote: >> Peter, >> >> I repeated the steps you described and I can confirm that with the >> -classpath argument the compilation fails and without it the >> compilation succ

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Antoine Levy-Lambert
Steve Loughran wrote: > Peter Reilly wrote: >> On 10/17/06, Chavdar Botev <[EMAIL PROTECTED]> wrote: >>> Peter, >>> >>> I repeated the steps you described and I can confirm that with the >>> -classpath argument the compilation fails and without it the >>> compilation succeeds. I also tried running

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Steve Loughran
Peter Reilly wrote: On 10/17/06, Chavdar Botev <[EMAIL PROTECTED]> wrote: Peter, I repeated the steps you described and I can confirm that with the -classpath argument the compilation fails and without it the compilation succeeds. I also tried running javac on "src/test/*.java" instead of "src/

Re: AW: a problem compiling a Java 5 project with generics

2006-10-18 Thread Steve Loughran
Matt Benson wrote: --- Peter Reilly <[EMAIL PROTECTED]> wrote: [SNIP] I have just checked the revision history, since the initial checkin (6 years, 9 months), has always added the destination path to the classpath for the javac command. It does not seem to be necessary? but I do not know if w

Re: Task help

2006-10-18 Thread Steve Loughran
Muthyala, Sunil wrote: Hello all, I am trying to automate some tasks and I need your help. 1. How to unzip a folder on a remote server (Windows NT), I am unable to nest it inside of FTP. I am zipping a folder on local machine and FTP'ing it to the server, but I need to unzip it in