I use maven-antrun-plugin and org.jacoco.ant.ReportTask to read source
codes from multiple projects and then generate jacoco report.
My project structure is as follows:
|--A
|-- A-jar
|----src/main/java (source files here)
|----target/classes (compiled files here)
|-- A-ear
|-- A-ejb
|--B
|-- B-jar
|----src/main/java (source files here)
|----target/classes (compiled files here)
|-- B-ear
|-- B-ejb
I have several projects with at the same level of A, and follow the same
maven structure, so I repeated <group> definition for each project, and use
<include> to specify classfiles and sourcefiles, such as
<group name="A">
<classfiles>
<fileset
dir="../../../A">
<include
name="**/target/classes/**/*.class" />
</fileset>
</classfiles>
<sourcefiles
encoding="UTF-8">
<fileset
dir="../../../A">
<include
name="**/src/main/java/**/*.java" />
</fileset>
</sourcefiles>
</group>
*But the problem is:*
In the generated jacoco report, source files are not linked. I can track to
a single method, but cannot check source code of the method by clicking the
method. There is no link url for each method.
I tried my best to troubleshoot, and find the following facts, but still
didn't know why source files are not linked in jacoco report, please help
me, thank you~
1. <include> of <classfiles> works
2. if i replace
<sourcefiles encoding="UTF-8">
<fileset
dir="../../../A">
<include
name="**/src/main/java/**/*.java" />
</fileset>
</sourcefiles>
with
<sourcefiles encoding="UTF-8">
<fileset
dir="../../../A/A-jar/src/main/java" />
<fileset
dir="../../../A/A-jar/src/main/java" />
<fileset
dir="../../../A/A-jar/src/main/java" />
</sourcefiles>
the source files can be linked
Thank you~
--
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].
For more options, visit https://groups.google.com/groups/opt_out.