Ok, this means your class files are compiled with debug information. 

Did you double check that your source files are available at the
location you provided? 

  --sourcefiles Path/src/main/java 

Note that this path needs to point to the parent folder of the Java
package hierarchy. E.g. if you have a class com.example.Foo the source
file has to be in this folder: 

  Path/src/main/java/com/example/Foo.java 

If this check is positive can you please share one of your class file? 

Thanks,
-marc 

On 2018-01-23 16:46, Sabyasachi Mishra wrote:

> Hi Marc, 
> My HTML report shows a column called lines. Attaching the screenshot. 
> 
> Thanks and Regards, 
> Sabyasachi Mishra
> 
> On Tuesday, 23 January 2018 18:57:01 UTC+5:30, Marc R. Hoffmann wrote: 
> 
> Hi, 
> 
> does your generated HTML report show a column called "Lines"? If not, the 
> class files do not contain debug information. 
> 
> Regards,
> -marc 
> 
> On 2018-01-23 14:01, Sabyasachi Mishra wrote: 
> HI Team, 
> 
> I am trying to compute code coverage for a build hosted in tomcat. I am 
> following the below steps. 
> 
> 1.     Added Java agent with Jacocoagent.jar in tomcat.conf file under 
> JAVA_OPTS  
> 
> JAVAAGENT:/OPT/JACOCO/LIB/JACOCOAGENT.JAR=DESTFILE=/OPT/JACOCO/RESULT/JACOCO.EXEC,CLASSDUMPDIR=/OPT/JACOCO/RESULT/CLASSES,APPEND=FALSE,INCLUDES=*
> 
> 2.     Started Tomcat. 
> 
> 3.     Ran tests. 
> 
> 4.     After tests are complete stoped the tomcat in order to generate the 
> .exec file. 
> 
> 5.     Keep class files which I wanted to instrument in one place along with 
> the exec file. 
> 
> 6.     Now ran the report generation command  
> 
> java -jar Path/jacococli.jar report Path/jacoco.exec --classfiles 
> Path/classes --html Path/Report --name jacocoReport --sourcefiles 
> Path/src/main/java 
> 
> Now I am able to generate HTML report. BUT NOT ABLE TO SEE THE HIGHLIGHTED 
> SOURCE CODE. But from the report I can see the functions under the classes. 
> 
> For adding debugging info to the class I have added below code to maven's 
> pom.xml 
> 
> <plugin> 
> 
> <groupId>org.apache.maven.plugins</groupId> 
> 
> <artifactId>maven-compiler-plugin</artifactId> 
> 
> <configuration> 
> 
> <source>1.8</source> 
> 
> <target>1.8</target> 
> 
> <debug>true</debug> 
> 
> <debuglevel>lines</debuglevel> 
> 
> </configuration> 
> 
> </plugin> 
> 
> Can anyone please tell me what I am missing or what I am doing wrong. 
> 
> Thanks in advance. 
> 
> Regards, 
> Sabyasachi Mishra  
> 
> -- 
> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/9d440a15-f2d2-49c3-91b8-2af73b0d6700%40googlegroups.com
>  [1].
> For more options, visit https://groups.google.com/d/optout [2].

  -- 
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/cfeda9f4-d697-49c3-ad08-959bf1e78582%40googlegroups.com
[3].
For more options, visit https://groups.google.com/d/optout. 

  

Links:
------
[1]
https://groups.google.com/d/msgid/jacoco/9d440a15-f2d2-49c3-91b8-2af73b0d6700%40googlegroups.com?utm_medium=email&amp;utm_source=footer
[2] https://groups.google.com/d/optout
[3]
https://groups.google.com/d/msgid/jacoco/cfeda9f4-d697-49c3-ad08-959bf1e78582%40googlegroups.com?utm_medium=email&amp;utm_source=footer

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/0d44c4ce238dd0ff05ba411f4cc37b1d%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to