Red Hat Bugzilla – Bug 601059
eclipse can't add JUnit4 to project
Last modified: 2010-08-23 15:30:51 EDT
Description of problem:
I can't add JUnit 4 library to a project's build path. Eclipse says about the library: "Current Location: Not Found". OTOH, there's no problem to add JUnit 3 library.
Version-Release number of selected component (if applicable):
eclipse-jdt 3.5.2 1.fc13
Steps to Reproduce:
1. Start Eclipse
2. Create a project
3. Project -> Properties -> Java Build Path -> Add Library -> JUnit -> JUnit library version: JUnit 4 -> Finish
Cannot add JUnit 4
It broke with some update sometimes in the age of Fedora 12. I could not solved it so I moved to upstream Eclipse which worked for me. Yesterday I installed a fresh clean Fedora 13 system, tried its Eclipse, and faced the problem again. Luckily I've found help at http://forums.fedoraforum.org/showthread.php?t=240886. The workaround is to install the eclipse-pde package.
Is this bug #538803? I thought we had a fix for that.
(In reply to comment #1)
> Is this bug #538803? I thought we had a fix for that.
This is not the same bug. The one you refer to is a real problem in the code. While this one is a packaging problem, junit4 bundle and it's dependencies have to move to jdt from pde.
I've asked whether this fixes the problem on the forum but I forgot to check there for response.
P.S. Is there a way to make the forums sent a mail on response?
(In reply to comment #2)
> While this one is a packaging problem, junit4 bundle and it's dependencies have
> to move to jdt from pde.
On F12 I see:
$ rpm -qf /usr/lib64/eclipse/dropins/jdt/plugins/org.junit4_4.5.0.v20090824
> P.S. Is there a way to make the forums sent a mail on response?
I'm not sure, sorry.
thanks for looking. The junit4 plugin in eclipse-jdt on F13, too:
# rpm -qf /usr/lib64/eclipse/dropins/jdt/plugins/org.junit4_184.108.40.206004121546
Actually, I uninstalled pde and adding JUnit4 is still OK! So it seems to me
it was sort of initial setup problem.
Hmm, I was wrong it's not junit4 but it's dependency hamcrest.core that have to move.
And I guess it's working after pde removal due to p2 metadata is still in the correct state despite the fact that pde was removed.
It should not work in a clean user environment.
(In reply to comment #5)
> It should not work in a clean user environment.
Hi Alexander, you're right. After pde removal a new user cannot add JUnit4.
Thanks for your investigation.
I attached a proposed patch for this and bug #602865 on that bug.
This koji build fixes this:
Fixed in eclipse-3.5.2-5.fc14 and beyond.