How can I get a HTML report with frames?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I get a HTML report with frames?

NickDeGraeve
I'm trying to generate an HTML report with frames but I fail: I just get an empty file.

I can have a simple report (checkstyle-simple.xsl) or a report without frames (checkstyle-noframes.xsl) but when I use checkstyle-frames.xsl I get no output.


What am I doing wrong?


JDK 1.6.0_15
Ant 1.7.1
Checkstyle 5.0


Extract of my build.xml:

<target name="run-checkstyle">
        <mkdir dir="${dir.reports.checkstyle}"/>
        <checkstyle config="${dir.checkstyle}/sun_checks.xml" failonviolation="no">
                <fileset dir="${dir.src}" />
                <formatter type="xml" toFile="${dir.reports.checkstyle}/checkstyle.xml"/>
        </checkstyle>
        <mkdir dir="${dir.reports.checkstyle.html}"/>
        <xslt in="${dir.reports.checkstyle}/checkstyle.xml" out="${dir.reports.checkstyle.html}/cs_noframes.html" style="${dir.checkstyle}/contrib/checkstyle-noframes.xsl"/> 
        <xslt in="${dir.reports.checkstyle}/checkstyle.xml" out="${dir.reports.checkstyle.html}/cs_frames.html" style="${dir.checkstyle}/contrib/checkstyle-frames.xsl"/>
</target>

Console log:

Buildfile: C:\Dvl\java\gtsc\framework4\build.xml
run-checkstyle:
[checkstyle] Running Checkstyle 5.0 on 25 files
     [xslt] Processing C:\Dvl\java\gtsc\framework4\reports\checkstyle\checkstyle.xml to C:\Dvl\java\gtsc\framework4\reports\checkstyle\html\cs_noframes.html
     [xslt] Loading stylesheet c:\checkstyle-5.0\contrib\checkstyle-noframes.xsl
     [xslt] Processing C:\Dvl\java\gtsc\framework4\reports\checkstyle\checkstyle.xml to C:\Dvl\java\gtsc\framework4\reports\checkstyle\html\cs_frames.html
     [xslt] Loading stylesheet c:\checkstyle-5.0\contrib\checkstyle-frames.xsl
BUILD SUCCESSFUL
Total time: 1 second
Reply | Threaded
Open this post in threaded view
|

Re: How can I get a HTML report with frames?

NickDeGraeve
Apparently the report is generated but in ${basedir} instead of the directory I want (reports/checkstyle/html)

How do I get it there?


<xslt basedir="${dir.reports.checkstyle.xml}"
        destdir="${dir.reports.checkstyle.html}"
        style="${dir.checkstyle}/contrib/checkstyle-frames.xsl" />

doesn't do it either.
Reply | Threaded
Open this post in threaded view
|

Re: How can I get a HTML report with frames?

NickDeGraeve
I got it working: I had to put Xalan on the <xslt> tag's classpath:

<xslt basedir="${dir.reports.checkstyle.xml}" destdir="${dir.reports.checkstyle.html}" style="${dir.checkstyle}/contrib/checkstyle-frames.xsl" >
        <classpath>
                <fileset dir="${dir.xalan}">
                        <include name="*.jar"/>
                </fileset>
        </classpath>
</xslt>