Only one subproject of the sources not linked, others are well

47 views
Skip to first unread message

diaoj...@gmail.com

unread,
Dec 10, 2018, 7:45:13 AM12/10/18
to JaCoCo and EclEmma Users
when I generate the report some of the highlighted sources are well and some others are not. 
I don't know how to debug further the missing highlighted sources: 
- Line coverage is present so debug info is there 
- I can decompile the .class so there is no obfuscation 
- I specified source folders as the direct parent of the folders that 
define the Java packages (I think I got that right since I get highlighted source for some of them) 

First I designation the source folders in gradle task then only the one subproject can not linked the sources.

then I try the command in terminal:
```

java -jar jacoco-0.8.2/lib/jacococli.jar report app/build/outputs/coverage.ec --classfiles build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/ --html app/build/outputs/reports --sourcefiles src/main/java/ --encoding utf-8 --name aaa 

[INFO] Loading execution data file app/build/outputs/coverage.ec.

[INFO] Analyzing 22 classes.

```

but it can not linked the sources. then I replace by other subprojects,it work well.

how can I debug or solve it

Marc Hoffmann

unread,
Dec 10, 2018, 8:06:58 AM12/10/18
to jac...@googlegroups.com
Hi,

looks like you already checked for the standard problems.

Can you please send a ZIP of the “broken" subproject? Or if this is not possible at least one of the class files?

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/e674665d-2fc0-4cec-8392-2285354cf557%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Evgeny Mandrikov

unread,
Dec 10, 2018, 8:10:01 AM12/10/18
to JaCoCo and EclEmma Users
In case of above command
source file for class file
"X.class"
that for example has location "build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/pkg/X.class"
and "SourceFile" attribute with value "Example.java" (see output of command "javap -v -p X.class")
will be searched at location
"src/main/java/org/pkg/Example.java".

diaoj...@gmail.com

unread,
Dec 10, 2018, 9:44:35 AM12/10/18
to JaCoCo and EclEmma Users

I had try the command 

javap -v -p build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/mat/nets/http/Abas.class


it returns 
SourceFile: "Abas.java"

then I found the source file path is 

src/main/java/com.mat.nets/http/Abas.java


this should be right?



在 2018年12月10日星期一 UTC+8下午9:10:01,Evgeny Mandrikov写道:

Evgeny Mandrikov

unread,
Dec 10, 2018, 9:58:44 AM12/10/18
to JaCoCo and EclEmma Users


On Monday, December 10, 2018 at 3:44:35 PM UTC+1, diaoj...@gmail.com wrote:

I had try the command 

javap -v -p build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/mat/nets/http/Abas.class


it returns 
SourceFile: "Abas.java"

then I found the source file path is 

src/main/java/com.mat.nets/http/Abas.java


this should be right?


No. According to what I wrote before:

source file for class file
"build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/mat/nets/http/Abas.class"
will be searched at location
"src/main/java/com.mat.nets/com/mat/nets/http/Abas.java"

not in

"src/main/java/com.mat.nets/http/Abas.java"

diaoj...@gmail.com

unread,
Dec 10, 2018, 10:06:33 PM12/10/18
to JaCoCo and EclEmma Users
thanks, I had fix the subproject, it works now.

Thank you again.

在 2018年12月10日星期一 UTC+8下午10:58:44,Evgeny Mandrikov写道:
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages