Bug 601059 - eclipse can't add JUnit4 to project
Summary: eclipse can't add JUnit4 to project
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: eclipse
Version: 13
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Andrew Overholt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-07 06:47 UTC by oli kron
Modified: 2010-08-23 19:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-23 19:30:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description oli kron 2010-06-07 06:47:58 UTC
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 12:30:07 UTC
Is this bug #538803?  I thought we had a fix for that.

Comment 2 Alexander Kurtakov 2010-06-07 12:47:35 UTC
(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 12:54:01 UTC
(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 13:30:46 UTC
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 13:49:31 UTC
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 18:13:50 UTC
(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 21:51:00 UTC
I attached a proposed patch for this and bug #602865 on that bug.

Comment 8 Andrew Overholt 2010-06-11 14:11:05 UTC
This koji build fixes this:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2244924

Comment 9 Andrew Overholt 2010-08-23 19:30:51 UTC
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.