问题
Can anyone please help me to understand what is wrong here?
I am using Cobertura 1.9.4.1 for Java Code Coverage. I want to attache the source file with HTML report, I am generating report using the below command:
cobertura-report.sh --format html --datafile $COBERTURA_HOME/core/emscore.ser --basedir $COBERTURA_HOME/core/src --destination $REPORT_DIR
HTML report generated successfully. Where I click on the file name in HTML report, it is giving the below error:
"Unable to locate com/airvana/serverImpl/ObjectDao.java. Have you specified the source directory?"
However I have the Java source file at:
$COBERTURA_HOME/core/src/com/airvana/serverImpl/ObjectDao.java
回答1:
using "--srcdir" instead of "--basedir" worked for me
回答2:
Got the answer from Cobertura's Developer forum. You can also submit your problem to cobertura-devel@lists.sourceforge.net
The final command I used to attache the source with HTML report is the below ().
cobertura-report.sh --format html --datafile $COBERTURA_HOME/core/emscore.ser --destination $REPORT_DIR $COBERTURA_HOME/core/src
来源:https://stackoverflow.com/questions/5592448/cobertura-unable-to-locate-file-problem