The jmock-1.1.0.ebuild file contains an error. The java-pkg_newjar eclass function is called twice, once to rename jmock-SNAPSHOT.jar into jmock.jar, and once to rename jmock-cglib-SNAPSHOT.jar into jmock.jar. This means that you end up with a bad jar. When you try to use the jmock.jar in Java projects, you get lots of ClassNotFoundExceptions. What should have been done is for the jmock-SNAPSHOT.jar to be repackaged into jmock.jar, and jmock-cglib-SNAPSHOT.jar to be repackaged into jmock-cglib.jar. Below is a patch of the ebuild to fix this: ------------ --- jmock-1.1.0.ebuild.orig 2007-01-08 18:29:06.000000000 +0100 +++ jmock-1.1.0.ebuild 2007-01-08 18:09:33.000000000 +0100 @@ -46,7 +46,7 @@ src_install() { java-pkg_newjar build/dist/jars/jmock-SNAPSHOT.jar jmock.jar - java-pkg_newjar build/dist/jars/jmock-cglib-SNAPSHOT.jar jmock.jar + java-pkg_newjar build/dist/jars/jmock-cglib-SNAPSHOT.jar jmock-cglib.jar dodoc CHANGELOG dohtml overview.html ------------ Reproducible: Always Steps to Reproduce: 1. Emerge jmock-1.1.0 2. Check the jmock.jar file in /usr/share/jmock-1.0/lib/ 3. Unpack the jmock-1.1.0 distfile, and build the sources using the supplied ant file. 4. Compare the jmock.jar in /usr/share/jmock-1.0/lib/ with the jar file you've just built. They are very different in size. Actual Results: I ended up with a single jmock.jar of size 3264 bytes. Expected Results: I expected to find a much larger jmock.jar and a jmock-cglib.jar
Created attachment 106069 [details] Patch for ebuild, renaming the second java-pkg_newjar file
Fixed with 1.1.0-r1, thanks for reporting!