Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 27756 invoked by uid 500); 6 Jul 2001 16:01:37 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 27747 invoked from network); 6 Jul 2001 16:01:36 -0000 From: =?iso-8859-1?Q?J=E9r=F4me_Lacoste?= To: Subject: RE: Bug? JUnit and classpath problems. Ant classloader? Date: Fri, 6 Jul 2001 17:59:03 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 In-Reply-To: Importance: Normal X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Stefan, thanks for the answer, > > Note the '\' prefixing the name as it is a specific case of the > > Shouldn't that be a forward slash? my mistake. > > So I guess it is a problem in Ant. I though it was a classLoader > > problem. > > I think it is. If so I can perhaps help to debug it? So I should run it in -debug mode, isn't it? Is there a way to run ant with the jdb instead of java? > The getResource methods have not been implemented in Ant 1.3, but they > are supposed to work in the nightly builds. Maybe the implementation > is not working correctly in all cases. I am using now 1.4 alpha from the 05th. Same problem. I should perhaps try to make a testcase. This bug - as it seems now - is painful to me. I am converting this project to Ant reuses Log4J. The project contains a wrapper class that loads the Log4J property file using this getResourceAsStream method. This fails with Ant but works otherwise. That's not practical. I will try to make a testcase but would be happy to know if other people experienced the same problems. > > I tried to fork the JVM and to force to pass the correct classpath > > by adding a sysproperty task before the junit one: > [snip] > > This didn't work. Forking the JVM fails because I then have to set > > JUnit in my classpath, thing that I don't want. > > Even if you don't want to do so, it would help to debug the current > situation. Please add junit.jar and optional.jar to your defined > classpath and run the task in forked mode. I do so now. It works but I had to modify my installation. It forces me to modify my ant script so it takes into account an external definition of the classpath, and I don't like it. I would prefer to only require ant installed (with the correct libraries). BTW I have an important question: I do put my third party libraries into the %ANT_HOME%\lib, so I only need to install it once per project. (I can see problems there if a project use a different version of the library installed with Ant. But otherwise?) Is this considered good or not?