windows 生成jacoco报告,已经附带了--sourcefiles,但是报告中无法查看源码

windows:

1、启动

java -javaagent:C:\Work\MyProgram\publish\jacoco-0.8.6\lib\jacocoagent.jar=includes=*,output=tcpserver,address=localhost,port=9999,destfile=C:\Work\MyProgram\HttpTestDemo\HttpDemo\jacoco01.exec -jar C:\Work\MyProgram\HttpTestDemo\HttpDemo\jar\main.jar

2、抓取数据

java -jar C:\Work\MyProgram\publish\jacoco-0.8.6\lib\jacococli.jar dump --address localhost --port 9999 --destfile C:\Work\MyProgram\HttpTestDemo\HttpDemo\jacoco01.exec

3、生成报告

java -jar C:\Work\MyProgram\publish\jacoco-0.8.6\lib\jacococli.jar report jacoco01.exec --classfiles C:\Work\MyProgram\HttpTestDemo\HttpDemo\bin\com\martin --sourcefiles C:\Work\MyProgram\HttpTestDemo\HttpDemo\src\com\martin --encoding utf-8 --html C:\Work\MyProgram\HttpTestDemo\HttpDemo\jacoRepor

这个参数估计错了,应该用 --sourcefiles C:\Work\MyProgram\HttpTestDemo\HttpDemo\src\