I'm an Ant neophyte trying to loosen the chains of the IDE builds that have been thrust upon me. Unfortunately, I'm having some issues and I was wondering if someone might be able to point out the error of my ways. I'm trying to compile some unit tests which are kept in the same package but a different location from the classes under test. When I try to compile the test classes, Ant complains that it can't find the class under test. So it would seem to be a classpath problem somewhere. In fact, I'm sure it's probably glaringly obvious but I've been staring at it for awhile and I just must be missing it. Maybe I need some more caffeine. Here's what part of my directory structure looks like:
Let's say I'm building off of the share source tree... The related .java files would be in src/share and they would be compiled to build/share. My unit test source for classes in the share source tree would be in test/share. Here's the relevant parts of my build script and the properties that are imported into it.
First, here are the relevant properties imported from a property file:
Currently I have one class, projecttemplate.StringBean that is being used by my test projecttemplate.TestStringBean. StringBean is compiling fine and I can see StringBean.class in build/share/projecttemplate as expected. The problem comes when running the compile-tests target:
If anyone can point out where I'm screwing up I'd really appreciate it! [ March 11, 2005: Message edited by: Jason Menard ]