[rfc][icedtea-web] dont expect junit have hamcrest included

Omair Majid omajid at redhat.com
Mon Jan 26 15:25:58 UTC 2015


Hi,

* Jiri Vanek <jvanek at redhat.com> [2015-01-26 06:12]:
> The fix is to make sure that the hamcrest jar is available on the
> classpath next to junit.jar too. The attached patch (for icedtea-web)
> does that and works on my machine with an upstream junit 4.12 jar.

A couple of thoughts: 

Upstream clearly states that you need to put junit.jar and hamcrest.jar
in your classpath in one place [1] but only mentions junit.jar in
another [2].

Some distributions somehow transitively include hamcrest.jar in the
claspath of junit.jar (such as debian [3]) and some distributions
include the hamcrest classes in junit.jar (such as current release of
Fedora). And a third type include a junit.jar which needs hamcrest.jar
on the user-provied classpath to work.

Maybe we should add more extensive configure tests to detect and handle
all these cases correctly? The current patch assumes that the hamcrest
jar, if present, is both needed by and compatible with junit.

Thanks,
Omair

[1] https://github.com/junit-team/junit/wiki/Download-and-Install#plain-old-jar
[2] https://github.com/junit-team/junit/wiki/Getting-started
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=527308
-- 
PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95  0056 F286 F14F 6648 4681


More information about the distro-pkg-dev mailing list