How to get Jenkins to find JUnit when creating with Ant?
Reading the answers here and here I believe that I have a problem with the classpath, but I cannot solve it. In my Netbeans project, I have one JUnit test that works fine in Netbeans. I push the project to my Git repository and Jenkins sees the change and builds the project, but I get a bunch of errors (below) because JUnit was not found.
-do-compile-test: [javac] Compiling 1 source file to C:\Jenkins\jobs\demo\workspace\demo\build\test\classes [javac] C:\Jenkins\jobs\demo\workspace\demo\test\MainTest.java:6: package org.junit does not exist [javac] import org.junit.After; [javac] ^ [javac] C:\Jenkins\jobs\demo\workspace\demo\test\MainTest.java:7: package org.junit does not exist [javac] import org.junit.AfterClass; [javac] ^
JUnit is located in my %ANT_HOME%\lib directory (Windows 7 64 bit). The file structure of my Netbeans project is as follows:

I tried to edit the class path through Ant, as described here, but I cannot get it to work correctly.
This is my first exit with Ant, JUnit, and Jenkins, but I think I'm really close to getting everything working correctly with Netbeans and Git. I gladly provided more information. Fighting this for 3 days, so any help would be greatly appreciated.
source share