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

Bug 340167

Summary: Add JUnit 4.8.2 to Orbit
Product: [Tools] Orbit Reporter: Markus Keller <markus.kell.r>
Component: bundlesAssignee: DJ Houghton <dj.houghton>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert
Version: unspecified   
Target Milestone: Indigo M7   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 336740    

Description Markus Keller CLA 2011-03-16 10:51:28 EDT
CQ for JDT project:
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=4898

JDT bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=336740

JUnit downloads (take 4.8.2, not the 4.9 beta):
https://github.com/KentBeck/junit/downloads
Comment 1 DJ Houghton CLA 2011-03-16 11:13:52 EDT
Orbit CQ: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=5022
Comment 2 DJ Houghton CLA 2011-03-21 10:07:39 EDT
The CQ has been approved. I will look at converting the download to a bundle and adding it to Orbit.
Comment 3 DJ Houghton CLA 2011-03-21 11:46:45 EDT
The website lists a JAR for 4.8.2 as well as a junit-dep-4.8.2 JAR file. My inclination is to grab the regular JAR but the about.html for 4.8.1 refers to the dep JAR as the binary one. Is that the one I should download? I checked the website and but didn't see a description or list of differences in the two JARs.
Comment 4 Markus Keller CLA 2011-03-21 14:17:19 EDT
Please take the junit-dep-4.8.2.jar. Despite its name, that's actually the one *without* dependencies, i.e. it does not include the org.hamcrest package.

junit-4.8.2-src.jar contains the sources (also without hamcrest, which is good).
Comment 5 DJ Houghton CLA 2011-03-21 14:20:09 EDT
Ok thanks. I'll try and get this done today so we can get a clean Orbit build with the new JARs asap.
Comment 6 DJ Houghton CLA 2011-03-21 15:24:11 EDT
Code released and I kicked off a build. Should be completed in about 2 hours.
Comment 7 Markus Keller CLA 2011-03-21 15:37:42 EDT
Looks good, but in the 2 about.html, you need to keep the
<h4>Hamcrest Library 1.1</h4>
section. Although we don't mix Hamcrest and JUnit packages into one bundle, the JUnit implementation also copied a few classes from Hamcrest, and therefore, we still need to include that license.
Comment 8 DJ Houghton CLA 2011-03-21 16:28:07 EDT
Ok cool, I'll add them back. I wasn't sure because I saw the JUnit bundle require Hamcrest so I thought maybe it used to include them and then we removed them but forgot to update the about previously.
Comment 9 DJ Houghton CLA 2011-03-22 07:42:52 EDT
The new JUnit is available in the latest i-build.
Comment 10 Markus Keller CLA 2011-03-22 10:55:34 EDT
2 last problems in the project from CVS:

- junit.jar is not exported in .classpath
=> compile errors in workspace

- <name> in .project would better be "org.junit_v4.8.2" (follow pattern from older versions)
Comment 11 DJ Houghton CLA 2011-03-22 11:59:41 EDT
Ok cool. Thanks for double-checking the project.
I've made those changes in CVS. 
I won't spin another build since those files aren't shipped with the JAR.
Comment 12 Markus Keller CLA 2011-03-22 13:10:15 EDT
Thanks, CVS looks good now.

> I won't spin another build since those files aren't shipped with the JAR.

Not directly, but the MANIFEST.MF of org.junit_4.8.2.v4_8_2_v20110321-1705.jar now contains:

Eclipse-SourceReferences: scm:cvs:pserver:dev.eclipse.org:/cvsroot/too
 ls:org.eclipse.orbit/org.junit;tag=v4_8_2_v20110321-1705

So when I try to import that version using PDE's "Import from a repository" feature, I'll get the broken version.

I think this is one of the very few moments where moving the v4_8_2_v20110321-1705 tag in CVS to the trunk of the v4_8_2 branch would be safe and the right thing to do.
Comment 13 DJ Houghton CLA 2011-03-22 13:16:06 EDT
Don't you ever sleep? :-)
Ok, I just moved the tag so the new .classpath and .project files are included.
Comment 14 Markus Keller CLA 2011-03-22 13:56:24 EDT
> Don't you ever sleep? :-)
Never ;-) http://xkcd.com/386/

> Ok, I just moved the tag so the new .classpath and .project files are included.
Thanks, everything's perfect now.
Comment 15 DJ Houghton CLA 2011-03-22 14:28:16 EDT
hehe just got introduced to the humour of xkcd recently. so funny!