Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320981

Summary: PDE Plugin Tests: Required plug-in 'org.junit4' could not be found.
Product: [Eclipse Project] PDE Reporter: Philipp Nanz <philippn>
Component: UIAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, daniel_megert, darin.eclipse, dj.houghton, Fanatic_69, thomas, zanetu
Version: 3.6   
Target Milestone: 3.7 M6   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Philipp Nanz CLA 2010-07-27 03:05:07 EDT
Build Identifier: Helios final

As far as I understand all references to the org.junit4 bundle as well as org.eclipse.jdt.junit4.runtime were removed and this bundle should not be needed anymore.

However PDE plugin tests still do not run without these bundles being available in the target platform or the launching application.

The source of the problem appears to be org.eclipse.pde.launching.JUnitLaunchConfigurationDelegate at line 431

For more information, please see http://www.eclipse.org/forums/index.php?t=msg&th=172554&start=0&

Reproducible: Always
Comment 1 Curtis Windatt CLA 2010-07-29 14:18:08 EDT
The tests do require the junit4 bundles to run, the line you specified is not the root of the problems though.  The junit4 bundles are being included in the Eclipse SDK, but I don't know what requires them.

cc'ing Dani as he will know more about what junit bundles are required.
Comment 2 Dani Megert CLA 2010-07-30 01:32:35 EDT
>As far as I understand all references to the org.junit4 bundle as well as
>org.eclipse.jdt.junit4.runtime were removed
This is two times wrong ;-)
1. 'org.junit4' is no longer needed but only if you replace the reference with
   'org.junit' version 4.8.1
2. The 'org.eclipse.jdt.junit4.runtime' is still needed as it is the Eclipse 
   JDT side of the  runtime story.

See also http://wiki.eclipse.org/Eclipse/Testing/JUnit4_Changes.
Comment 3 Thomas Hallgren CLA 2010-07-30 02:28:15 EDT
I think the problem is that there is a hardcoded reference to the 'org.junit4' bundle in the PDE source code.

We tried to remove the 'org.junit4' from the Buckminster PDE feature but that actually crashed some builds. Not because they were referencing this bundle directly, but because they wanted a junit4 build. The product contains 'org.junit' 4.8.1.
Comment 4 Darin Wright CLA 2010-07-30 09:46:43 EDT
Looks like the launcher should be fixed up to include the org.junit bundle(s) rather than the org.junit4 bundle:

org.eclipse.pde.launching.JUnitLaunchConfigurationDelegate.getRequiredPlugins(ILaunchConfiguration)
Comment 5 Curtis Windatt CLA 2011-02-04 18:08:01 EST
Fixed in HEAD.  There is no need to require org.junit4.  org.junit is still required.