Details
-
Bug
-
Resolution: Handled by Support
-
Medium
-
4.0.0
Description
Clover database is generated on my Mac and trying to generate report on target server where our automation runs.Getting errors for all the java filed and no coverage report
ERROR: Failed to render syntax highlights for /.....
Noticed similar issue at CLOV-1415 - The clover2:clover goal does not pass the sourcepath property to underlying <clover-report> task Open
Tried to add sourcepath element in my maven clover configuration and still problem is not solved
Given below my POM example
Using clover version - 4.0.0
Coped custom_clover_report_descriptor.xml in parent module
<custom.clover.report.descriptor.location>../custom_clover_report_descriptor.xml</custom.clover.report.descriptor.location
*
When I run in debug mode mvn -X -> I see source files are picking up and saying "FOUND".*
Not sure what else I am missing here. Need your help.
*POM.xml
=========*
<build> <plugins> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-clover2-plugin</artifactId> <version>${clover.version}</version> <configuration> <cloverOutputDirectory /> <flushPolicy>threaded</flushPolicy> <flushInterval>100</flushInterval> <failOnViolation>false</failOnViolation> <alwaysReport>true</alwaysReport> <jdk>1.8</jdk> <licenseLocation>${clover.licenselocation}</licenseLocation> <generateHtml>true</generateHtml> <generateXml>true</generateXml> <includesTestSourceRoots>false</includesTestSourceRoots> <singleCloverDatabase>true</singleCloverDatabase> <reportDescriptor>${custom.clover.report.descriptor.location}</reportDescriptor> </configuration> <executions> <execution> <id>clover</id> <goals> <goal>setup</goal> <goal>snapshot</goal> </goals> </execution> <execution> <phase>verify</phase> <goals> <goal>aggregate</goal> <goal>clover</goal> <goal>check</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-clover2-plugin</artifactId> <configuration> <contextFilters>static</contextFilters> </configuration> </plugin> </plugins> </reporting>
*custom_clover_report_descriptor.xml
================================*
<project name="Clover Report" default="current"> <clover-format id="clover.format" type="${type}" orderBy="${orderBy}" filter="${filter}" reportStyle="${reportStyle}"/> <clover-setup initString="${cloverdb}"/> <fileset id="test.sources" dir="${projectDir}"> <include name="${testPattern}"/> </fileset> <clover-columns id="clover.columns"> <totalChildren/> <filteredElements/> <avgMethodComplexity/> <uncoveredElements format="raw"/> <totalPercentageCovered format="longbar"/> </clover-columns> <target name="historical"> <clover-report> <current outfile="${output}" summary="${summary}" charset="${charset}" title="${title}" titleAnchor="${titleAnchor}" span="${span}" alwaysReport="${alwaysReport}" showInnerFunctions="${showInnerFunctions}" showLambdaFunctions="${showLambdaFunctions}"> <format refid="clover.format"/> <testsources refid="test.sources"/> <columns refid="clover.columns"/> </current> <historical outfile="${historyout}" historydir="${history}" charset="${charset}" title="${title}" titleAnchor="${titleAnchor}" span="${span}"> <format refid="clover.format"/> </historical> </clover-report> </target> <target name="current"> <clover-report> <current outfile="${output}" summary="${summary}" charset="${charset}" title="${title}" titleAnchor="${titleAnchor}" span="${span}" alwaysReport="${alwaysReport}" showInnerFunctions="${showInnerFunctions}" showLambdaFunctions="${showLambdaFunctions}"> <format refid="clover.format"/> <testsources refid="test.sources"/> <columns refid="clover.columns"/> <sourcepath> <pathelement location="${projectDir}/src/main/java"/> <!-- <pathelement path="src/main/java"/> --> <!-- <dirset dir="."> <include name="**/src/main/java" /> </dirset> --> </sourcepath> </current> </clover-report> </target> </project>