If I modify the test code to actually reference the class under test, it will no longer build.
e.g., add one line to Test.java
public void testTestOneJar1() {
new TestOneJarMain().run(); // let's just call the thing from the test!
System.out.println("testTestOneJar1: OK");
}
Now, ant building gives you:
[javac] C:\svn\sb\testOneJar\test\com\oco\utility\testOneJar\test\Test.java:11: package com.oco.utility.testOneJar.main does not exist
[javac] import com.oco.utility.testOneJar.main.TestOneJarMain;
[javac] ^
[javac] C:\svn\sb\testOneJar\test\com\oco\utility\testOneJar\test\Test.java:24: cannot find symbol
[javac] symbol : class TestOneJarMain
[javac] location: class com.oco.utility.testOneJar.test.Test
[javac] new TestOneJarMain().run();
[javac] ^
[javac] 2 errors
So it seems the class path for the tests doesn't include the main application classes under src.
I put the classes/src on the compile time class path, and that silences these warnings, but moves the error to runtime when you try to run the test jar.
Sorry that was anonymous. mbeckerle posted the bug. Note this bug still exists in 0.98-RC2.
Thanks for reporting this. I'll take a look, I don't think this should be happening -- there are plenty of tests in the build tree, but the appgen mechanism is new and might be missing something.