ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <jakarta-...@ehatchersolutions.com>
Subject Re: another unit-test question
Date Wed, 05 Mar 2003 00:53:54 GMT
On Tuesday, March 4, 2003, at 07:42  PM, Erik Price wrote:
> Great.  ${ant.home} was exactly what I needed.  (Actually, it didn't 
> work at first, and I wondered if I had done something wrong but my 
> build file seemed to be right.  It turns out that junit.jar doesn't 
> work if it's a symlink [at least on Cygwin], but when I copied the JAR 
> into ANT_HOME it worked great.  Strangely, xalan.jar [for generating 
> reports per the <junitreport> task] works fine as a symlink into 
> ANT_HOME.)

I'm guessing you mean ANT_HOME/lib rather than just ANT_HOME here.  
Only the lib subdirectory is part of the operating classpath, not the 
root directory (just in case that was the issue you had).

> I hadn't thought of that.  It seems that a lot of the constraints that 
> I took for granted (specifically keeping files together, etc) are 
> lifted when you explicitly declare classpaths via ant etc.  My 
> interpretation of what you are saying is that when you run your unit 
> tests, it is as if you were doing a standard "compile" target (your 
> production code goes where it's supposed to), and the unit-test .class 
> files go into the "test" directory -- and that they never need to be 
> brought into the same directory because ant can "see" the unit-test 
> code and the production code even when they are in different dirs.

Actually its not even a constraint at the command-line without Ant.  
Its a class *path* and can be a series of directories.  So its always 
been ok to separate test and production source and .class files.  Ant 
makes dealing with classpaths a lot easier, and is one of the nicest 
things about using Ant, in fact.

	Erik


Mime
View raw message