Please update Junit to version 4.7. I will submit a patch that makes a few minor changes to the ebuild: 1. Set EAPI="2" 2. Change hamcrest-core dependency to slotted hamcrest-core:0. 3. Change src_unpack to src_prepare Item 2 is dependent on item 1, and I have included it because of the new hamcrest-core ebuild I will submit. Version 1.2 of hamcrest breaks Junit, so Junit is dependent on hamcrest-core-1.1.
Created attachment 206092 [details, diff] Patch to update the 4.6 ebuild.
Created attachment 208768 [details, diff] Updated ebuild for JUnit 4.7 This is an updated ebuild that implements a few new changes: 1. Split src_prepare into src_unpack and java_prepare 2. Removed dependency on unzip by using jar 3. Added more verbose die messages 4. Cleaned test method (junit.tests.AllTests runs all tests) Most importantly: 5. Adds a 'Class-Path' entry that refers to 'hamcrest-core.jar'. This should resolve bugs like 209273.
Created attachment 208770 [details] Manifest file.
I will be committing these changes to java-experimental.
Ok I don't think this is the way to do this. Possible we should put an einfo message about this or we should register-option-dep in the ebuild. I don't believe this issue occurs with eclipse-3.5.1 now.
(In reply to comment #5) > Ok I don't think this is the way to do this. Possible we should put an einfo > message about this or we should register-option-dep in the ebuild. I think the classpath entry in manifest is fine solution. No need to register-option-dep, as the dep is already registered unconditionally. But eclipse doesn't use our package.env files to evaluate dependencies... > I don't believe this issue occurs with eclipse-3.5.1 now. Some new comments on bug 209273 say otherwise. I think the solution is fine. Since upstream junit bundles hamcrest classes inside its jar, classpath entry in manifest is a solution that should probably work equivalently all times, and I can't think of any bad side effects.
i applied your patch (i had to do that manually as it did not apply cleanly on the latest ebuild) and did some manual adjustments. i did not apply that dohtml chunk as dohtml dies by itself afaik. the patch can be found in junit-4.8.2-r1. thank you for your patch, i hope it will fix the eclipse and netbeans issues with running junit-4 tests that depend on hamcrest-core.