Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 287757 - Version bump: dev-java/junit-4.7
Summary: Version bump: dev-java/junit-4.7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords: InOverlay
Depends on:
Blocks: 209273 287763 339483
  Show dependency tree
 
Reported: 2009-10-05 13:40 UTC by Daniel Solano Gómez
Modified: 2011-01-18 14:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to update the 4.6 ebuild. (junit-4.7.patch,794 bytes, patch)
2009-10-05 13:41 UTC, Daniel Solano Gómez
Details | Diff
Updated ebuild for JUnit 4.7 (test,3.05 KB, patch)
2009-10-30 19:17 UTC, Daniel Solano Gómez
Details | Diff
Manifest file. (gentoo-manifest.mf,54 bytes, text/plain)
2009-10-30 19:19 UTC, Daniel Solano Gómez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Solano Gómez 2009-10-05 13:40:21 UTC
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.
Comment 1 Daniel Solano Gómez 2009-10-05 13:41:54 UTC
Created attachment 206092 [details, diff]
Patch to update the 4.6 ebuild.
Comment 2 Daniel Solano Gómez 2009-10-30 19:17:59 UTC
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.
Comment 3 Daniel Solano Gómez 2009-10-30 19:19:01 UTC
Created attachment 208770 [details]
Manifest file.
Comment 4 Daniel Solano Gómez 2009-10-30 19:21:36 UTC
I will be committing these changes to java-experimental.
Comment 5 Alistair Bush (RETIRED) gentoo-dev 2010-03-03 09:24:25 UTC
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.
Comment 6 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2010-03-03 10:07:14 UTC
(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.
Comment 7 Miroslav Šulc gentoo-dev 2011-01-18 14:10:44 UTC
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.