Jacoco Exec count shows 0

960 views
Skip to first unread message

sneha agarwal

unread,
Oct 6, 2016, 2:14:20 PM10/6/16
to JaCoCo and EclEmma Users
I am using Jenkins plugin 2.0.1 and the jacoco version 0.7.6.
The coverage shows 0 and I do not see any exec file generated as well.
Please suggest.
POM file used :
 <plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.6.201602180812</version>
<configuration>
<destFile>../../coverage/jacoco.exec</destFile>
<reset>true</reset>
<append>false</append>
</configuration>
<executions>
<execution>
<id>dump</id>
<phase>integration-test</phase>
<goals>
<goal>dump</goal>
</goals>
</execution>
</executions>
</plugin>

and tomcat upddate CATALINA_OPTS="$CATALINA_OPTS -javaagent:/path/tomcat/lib/jacocoagent.jar=output=tcpserver,append=true,dumponexit=false,classdumpdir=/path/tomcat/classes-cov/,includes=com/abc/abc/**,address=*"

Marc R. Hoffmann

unread,
Oct 7, 2016, 3:45:59 AM10/7/16
to jac...@googlegroups.com
Hi,

please check your maven log files. The dump goal should log something like:

- "Connecting to..."
- "Dumping execution data to..."

Or a error is logged. This should give you an idea what actually is going on.

Regards,
-marc
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/96ad82d7-e3dd-4fc6-a09f-81baccc0a9e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sneha agarwal

unread,
Oct 7, 2016, 8:15:22 AM10/7/16
to jac...@googlegroups.com
Hi Marc,
I am getting this
[JaCoCo plugin] Collecting JaCoCo coverage data...
[JaCoCo plugin] **/**.exec;**/coverage/classes-cov;**/taxmaster/; locations are configured
[JaCoCo plugin] Number of found exec files for pattern **/**.exec: 0
[JaCoCo plugin] Saving matched execfiles:  
[JaCoCo plugin] Saving matched class directories for class-pattern: **/coverage/classes-cov:  /data/jenkins/workspace/TaxMasterServiceCodeCoverage/coverage/classes-cov
[JaCoCo plugin] Saving matched source directories for source-pattern: **/taxmaster/:  /data/jenkins/workspace/TaxMasterServiceCodeCoverage/Portal/apiTests/target/test-classes/com/myntra/apiTests/erpservices/taxMaster /data/jenkins/workspace/TaxMasterServiceCodeCoverage/coverage/classes-cov/com/myntra/taxmaster /data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com /data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra /data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster /data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster/engine /data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster/engine/impl /data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster/manager /data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster/manager/impl /data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster/manager/impl/customerVat /data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster/util /data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/resources
[JaCoCo plugin] Loading inclusions files..
[JaCoCo plugin] inclusions: []
[JaCoCo plugin] exclusions: []
[JaCoCo plugin] Thresholds: JacocoHealthReportThresholds [minClass=0, maxClass=30, minMethod=0, maxMethod=30, minLine=0, maxLine=30, minBranch=0, maxBranch=30, minInstruction=0, maxInstruction=30, minComplexity=0, maxComplexity=30]
[JaCoCo plugin] Publishing the results..
[JaCoCo plugin] Loading packages..
[JaCoCo plugin] Done.
[JaCoCo plugin] Overall coverage: class: 0, method: 0, line: 0, branch: 0, instruction: 0
Started calculate disk usage of build

To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacoco/E3-ZShy_-cY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/85a388f9-18bb-6745-7b11-134935cb9015%40mountainminds.com.

Marc Hoffmann

unread,
Oct 7, 2016, 9:50:30 AM10/7/16
to jac...@googlegroups.com
Hi,

I was asking for the *maven* logfiles. This is where the dump goal is executed. Looks like you provided the Jenkins logfile.

-marc
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/CAPExvo96xdoJvq4YMZdExHJP%2BN2OJBvKceXj3QAQZWtaoLz2iQ%40mail.gmail.com.

sneha agarwal

unread,
Oct 17, 2016, 5:58:42 AM10/17/16
to jac...@googlegroups.com
Hi Marc, 
Attached the maven logs.
I do not see this goal being executed at all.

--
You received this message because you are subscribed to a topic in the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacoco/E3-ZShy_-cY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+unsubscribe@googlegroups.com.
MavenLogs.rtf

Marc R. Hoffmann

unread,
Oct 17, 2016, 7:18:17 AM10/17/16
to jac...@googlegroups.com
Right, from the log file you see that the goal is not executed.

So you need to configure your build that the goal actually gets executed! There is nothing special about that goal. Please refer to Maven documentation how to execute a goal.

Regards,
-marc
-- You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/CAPExvo_8UG5oUdmQAXuSzwR_%2BY1m%3DQx44KiMYgT%3Dg_tsCg%2B2Ew%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

-- 
Marc Hoffmann
hoff...@mountainminds.com
_______________________________________________
Mountainminds GmbH & Co. KG

Nussbaumstr. 4 * 80336 Muenchen * Germany 
Phone/Fax +49-700-68664637 * 0700-MTNMINDS

Registergericht Muenchen * HRA 80201
Mountainminds Verwaltungs GmbH
Registergericht Muenchen * HRB 143183
Geschaeftsfuehrer Marc Hoffmann
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages