ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Magnus Strandberg <magnus.strandb...@gmail.com>
Subject Some feedback
Date Tue, 19 Apr 2011 22:13:42 GMT
Hi,

I've just stated to learn Ant and must say it's a really good documentation.
I've worked through the "Hello World with Apache Ant" and found a minor
error in the "Testing the class" section.

The path id cannot be identified from the "junit" target. The path id should
be global, e.g.

    <path id="application" location="${jar.dir}/${ant.project.name}.jar"/>

    ....

    <target name="run" depends="jar">

        <java fork="true" classname="${main-class}">

        <classpath>

        <path refid="classpath"/>

        <path refid="application"/>

        </classpath>

        </java>

    </target>

     <target name="junit" depends="jar">

<mkdir dir="${report.dir}"/>

<junit printsummary="yes">

            <classpath>

        <path refid="classpath"/>

<path refid="application"/>

    </classpath>

     <formatter type="xml"/>

     <batchtest fork="yes" todir="${report.dir}">

<fileset dir="${src.dir}" includes="*Test.java"/>

    </batchtest>

</junit>

    </target>



Br,

Magnus

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message