Include JUnit4 explicitly in test classpath.
authorW. Trevor King <wking@drexel.edu>
Fri, 7 Oct 2011 04:31:40 +0000 (00:31 -0400)
committerW. Trevor King <wking@drexel.edu>
Fri, 7 Oct 2011 04:31:40 +0000 (00:31 -0400)
Otherwise I get errors like:

    [junit] No tests found in nom.tam.fits.test.AsciiTableTest

because ant is not recognizing the @Test annotation.

I don't have this problem with my Gentoo ebuid, because (I think)

    ANT_TASKS="ant-junit4" eant

is taking care of the classpath adjustment automatically.

build.xml

index 869a4e426c816a92a52f9a1c85c059808853faa1..9472ab7ce2d6d90904d55ac38b26a5a729c239ea 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -12,6 +12,7 @@
     </path>
     <path id="test.class.path">
       <pathelement location="${build}"/>
+      <pathelement location="/usr/share/junit-4/lib/junit.jar"/>
     </path>
   </target>
   <target name="all" depends="jar,javadoc"