简体   繁体   中英

Error in Target xslt in build.xml for ecllipse

Im trying to include xslt reports in my Testng framework with ant. When I try to execute the the MakeReport target in build.xml I get some error related to classpath saying Reference test.classpath not found . Below is the target code for generating xslt.

<target name="makexsltreport">
    <delete dir="${basedir}/testng-xslt">
    </delete>
    <mkdir dir="${basedir}/testng-xslt">
    </mkdir>
    <xslt in="${ng.result}/testng-results.xml" style="src/xslt/testng-results.xsl" out="${ws.home}/testng-xslt/index.html" 
          classpathref="test.c" processor="SaxonLiaison"> 
<!-- THE ERROR IS IN ABOVE LINE -->
        <param expression="${basedir}/testng-xslt/" name="testNgXslt.outputDir" />
        <param expression="true" name="testNgXslt.sortTestCaseLinks" />
        <param expression="FAIL,SKIP,PASS,CONF,BY_CLASS" name="testNgXslt.testDetailsFilter" />
        <param expression="true" name="testNgXslt.showRuntimeTotals" />
         <classpath refid="classpath"> 
        </classpath> 
    </xslt>
</target>

Please help on how to solve this issue. i tried everything.

Reference test.classpath not found

means that Ant wasn't able to find the test.classpath path that you have referenced with classpathref . How are you defining that path? If the <path id="test.classpath"> is inside a target then you will need to make your makexsltreport target depend (directly or indirectly) on the one that defines the path.

Also you should not use both a classpathref attribute and a <classpath> element - use one or the other.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM