Bug 601059 - eclipse can't add JUnit4 to project
eclipse can't add JUnit4 to project
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: eclipse (Show other bugs)
13
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Andrew Overholt
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-07 02:47 EDT by oli kron
Modified: 2010-08-23 15:30 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-23 15:30:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description oli kron 2010-06-07 02:47:58 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

How reproducible:
Easy, always

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
  
Actual results:
Cannot add JUnit 4

Expected results:
JUnit4 added

Additional info:
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.
Comment 1 Andrew Overholt 2010-06-07 08:30:07 EDT
Is this bug #538803?  I thought we had a fix for that.
Comment 2 Alexander Kurtakov 2010-06-07 08:47:35 EDT
(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?
Comment 3 Andrew Overholt 2010-06-07 08:54:01 EDT
(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
eclipse-jdt-3.5.1-22.fc12.x86_64

> P.S. Is there a way to make the forums sent a mail on response?    

I'm not sure, sorry.
Comment 4 oli kron 2010-06-07 09:30:46 EDT
Andrew,

thanks for looking. The junit4 plugin in eclipse-jdt on F13, too:

# rpm -qf /usr/lib64/eclipse/dropins/jdt/plugins/org.junit4_4.5.0.201004121546
eclipse-jdt-3.5.2-1.fc13.x86_64

Actually, I uninstalled pde and adding JUnit4 is still OK! So it seems to me
it was sort of initial setup problem.
Comment 5 Alexander Kurtakov 2010-06-07 09:49:31 EDT
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.
Comment 6 oli kron 2010-06-07 14:13:50 EDT
(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.

Oli
Comment 7 Andrew Overholt 2010-06-10 17:51:00 EDT
I attached a proposed patch for this and bug #602865 on that bug.
Comment 8 Andrew Overholt 2010-06-11 10:11:05 EDT
This koji build fixes this:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2244924
Comment 9 Andrew Overholt 2010-08-23 15:30:51 EDT
Fixed in eclipse-3.5.2-5.fc14 and beyond.

Note You need to log in before you can comment on or make changes to this bug.