Description of problem: org.jacoco.agent.rt.jar have missing Premain-Class attribute in manifest line "Premain-Class org.jacoco.agent.rt.internal.PreMain" is misisng in 0.7.2 which is available (finally! ty!) in f21 Without this line the agent do not work at all. Adding this line to your jar, is making jacoco working again. Version-Release number of selected component (if applicable): 0.7.2 How reproducible: always Steps to Reproduce: 1. run any commandline codecoverage - it do not start or 1. check /usr/share/java/jacoco/org.jacoco.agent.rt.jar/META_INF/MANIFEST.MF and see the line missing On f20 and older i have custom builds of jacoco, so I can not ferify if it is regression. Please note, fedroa guidelines acording to Main-Class do not affect Premain-CLass
I have a bunch of trips for the rest of the month so would not be able to look into it before November. Let me know if you want to fix it yourself, request commit rights in pkgdb and I'll approve it, otherwise you would have to wait few weeks.
Once I submit the bug, and see who is maintainer, I realized my error in bugging it :)) Is one line post-build jar modification ok for you? If so, I will fix it for you in asap.
Just to be clear to the end of the build, jar -umf X %{jacoco_dir}/org.jacoco.agent.rt.jar where X is file with three lines: Manifest-Version: 1.0 Premain-Class: org.jacoco.agent.rt.internal.PreMai EOF
*Premain-Class: org.jacoco.agent.rt.internal.PreMain
(In reply to jiri vanek from comment #3) > Just to be clear > to the end of the build, > jar -umf X %{jacoco_dir}/org.jacoco.agent.rt.jar > > where X is file with three lines: > Manifest-Version: 1.0 > Premain-Class: org.jacoco.agent.rt.internal.PreMai > > EOF Not ideal fix but feel free to do it that way together with TODO comment to inspect why it's not done by the build.
Here we go: https://jvanek.fedorapeople.org/jacoco-premain/ I have asked for push access. If you grant, I will build and push updates. Otherwise feel free to act: diff --git a/EnchancedManifest.mf b/EnchancedManifest.mf new file mode 100644 index 0000000..fb315f3 --- /dev/null +++ b/EnchancedManifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Premain-Class: org.jacoco.agent.rt.internal.PreMain + diff --git a/jacoco.spec b/jacoco.spec index 3d99faa..7d40ac2 100644 --- a/jacoco.spec +++ b/jacoco.spec @@ -2,12 +2,13 @@ Name: jacoco Version: 0.7.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Java Code Coverage for Eclipse Group: System Environment/Libraries License: EPL URL: http://www.eclemma.org/jacoco/ Source0: https://github.com/jacoco/jacoco/archive/v%{version}.tar.gz +Source1: EnchancedManifest.mf Patch0: removeUselessBuildParts.patch @@ -70,6 +71,14 @@ A Jacoco plugin for maven. dos2unix org.jacoco.doc/docroot/doc/.resources/doc.css +# workaround missing premain in agent.rt RH1151442. Not sure where to fix this in build. +# TODO, fix in build itself +# all have already premain, sources don't need. +a=`find org.jacoco.agent.rt/target/ | grep jar | grep -v -e sources -e all` +for x in $a ; do +jar -umf %{SOURCE1} $x +done; + %install %mvn_install @@ -88,6 +97,10 @@ echo %{name} %{name}/org.jacoco.ant > %{buildroot}%{_sysconfdir}/ant.d/%{name} %files javadoc -f .mfiles-javadoc %changelog +* Sat Oct 11 2014 Jiri Vanek <jvanek> 0.7.2-2 +- added premain-class to agen.rt.jar +- RH1151442 + * Mon Sep 15 2014 Alexander Kurtakov <akurtako> 0.7.2-1 - Update to upstream 0.7.2.
jacoco-0.7.2-2.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/jacoco-0.7.2-2.fc21
Package jacoco-0.7.2-2.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing jacoco-0.7.2-2.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-12776/jacoco-0.7.2-2.fc21 then log in and leave karma (feedback).
jacoco-0.7.2-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.