Include hamcrest-core explicitly in test classpath.
authorW. Trevor King <wking@drexel.edu>
Fri, 7 Oct 2011 04:46:24 +0000 (00:46 -0400)
committerW. Trevor King <wking@drexel.edu>
Fri, 7 Oct 2011 04:48:54 +0000 (00:48 -0400)
Otherwise I get errors like:

    [junit] Testcase: initializationError(nom.tam.fits.test.AsciiTableTest):    Caused an ERROR
    [junit] org/hamcrest/SelfDescribing
    [junit] java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing

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
(hamcrest-core is listed in /usr/share/junit-4/package.env as a
dependency).

build.xml

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