I have the following problem – I’m running a checkstyle ant task when building with Jenkins and the respective report DOES get produced, but the thing is that when the build finishes I get a message that there has been an error during the parsing because the error report has not been found. I verified that I have set the path to the report that is to be published to the right thing (when I change it to something slightly different I get a message that xxx does not exist but the path from the previous version does exist). Any idea what might be wrong? What format is Jenkins expecting in order to publish the checkstyle report? I’m using the following build.xml
<taskdef
classpath="libs/checkstyle-5.6-all.jar"
resource="checkstyletask.properties" />
<target name="checkstyle" >
<checkstyle
config="checkstyle.xml"
failOnViolation="false" >
<fileset
dir="src"
includes="**/*.java" />
<formatter type="plain" />
<formatter type="xml" />
<formatter
toFile="checkstyle-result.xml"
type="xml" />
</checkstyle>
<style
style="checkstyle-noframes.xsl"
in="checkstyle-result.xml"
out="checkstyle-result.html" />
</target>
the config is the sun-checkstyle config.
Thanks for any help.
Try specifying **/checkstyle-result.xml as the result file location in your Jenkins job configuration; that will look through your entire build workspace for the result file. You can tighten up the file glob once you have things working.
If the above doesn’t work, post the error message you’re getting from Jenkins and the location of checkstyle-results.xml relative to your job’s workspace directory.