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

Bug 368042

Summary: "emma" command fails for Java 1.7 code
Product: z_Archived Reporter: Bernard Sarter <bernard.sarter>
Component: BuckminsterAssignee: buckminster.core-inbox <buckminster.core-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: achim.demelt, david_williams, thomas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Quick & dirty fix ... none

Description Bernard Sarter CLA 2012-01-06 11:22:32 EST
Build Identifier: 3.7.1 (Headless)

I have a project (Eclipse RCP app) written in Java 1.7; I can build the application with buckminster (headless), and use the buckminster "junit -l ..." command to start the tests (Ok).

I wanted to replace "junit" with "emma" to get coverage, but the command fails (errors like "Caused by: java.lang.VerifyError: Expecting a stackmap frame at branch target 11 in method XXX", and I have the feeling that it is because the headless buckminster emma plugin is out-dated, and does not support java 1.7.

Note: I can run the tests and the coverage from Eclipse IDE using the latest jacoco plugin.

Emma Version (installed using the command C:\Applis\buckminster>buckminster.bat install http://download.eclipse.org/tools/
buckminster/headless-3.7/ org.eclipse.buckminster.emma.headless.feature):

# org.eclipse.buckminster.emma_1.0.0.v20110629-1242.jar
# com.mountainminds.eclemma.core_1.4.2


Reproducible: Always

Steps to Reproduce:
1. See above report
Comment 1 Bernard Sarter CLA 2012-01-09 14:24:06 EST
Created attachment 209226 [details]
Quick & dirty fix ...

The enclosed "emma.java" file is a quick-incomplete-and-dirty workaround for this bug; The file (part of org.eclipse.buckminster.emma) can be compiled and used with following plugins:
- com.mountainminds.eclemma.core_2.0.1.201112281951.jar
- org.jacoco.agent_0.5.5.201112152213.jar
- org.jacoco.core_0.5.5.201112152213.jar
- org.jacoco.report_0.5.5.201112152213.jar

I could test the result and it works fine (but the 'merge' command is no longer available.

Note: with this configuration, a report generated by buckminster with the --emma command can be imported inside sonar (sonar.dynamicAnalysis=reuseReports & sonar.jacoco.reportPath={file produced by buckminster}), which is quite nice ;-)

HTH,
Bernard.
Comment 2 Thomas Hallgren CLA 2012-11-18 18:53:25 EST
Due to license restrictions and an expanding graph of dependencies that needs clearance from eclipse EMO, I decided to move the emma feature from our Eclipse download site to our external site at:

http://download.cloudsmith.com/buckminster/external-4.2

This move made it possible to upgrade to eclemma 2.2.0. It uses the jacoco agent, core, and report.

There are some changes to the output formats in Emma. The formats 'emma' and 'txt' are no longer supported and the new formats 'exec', 'htmlzip', 'csv' has been introduced. The full set is now:

csv
exec
html
htmlzip
xml
Comment 3 Bernard Sarter CLA 2012-11-19 06:01:14 EST
Ok, I could install and test your new version from 
http://download.cloudsmith.com/buckminster/external-4.2, everything is fine.

Note: I'm not so familiar with Eclipse Bugzilla workflow: who will mark this issue as Closed ? (shall I do it ?)

Thanks a lot,
Bernard.