alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Friki example source code file (localtest.xml)

This example Friki source code file (localtest.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Friki tags/keywords

ant_home/lib, ant_home/lib, can, can

The Friki localtest.xml source code

<project default="test">
  <property name='testclass' value='tests.LocalTests'/>
  
  <path id="classpath">
    <pathelement location="build/delivery/classes"/>
    <pathelement location="build/test/classes"/>
    <pathelement location="build/delivery/files/WEB-INF/classes"/>
    <fileset dir="_ext">
      <include name="**/*.jar"/>
    </fileset>
    <fileset dir="_lib">
      <include name="**/*.jar"/>
    </fileset>
    <pathelement path="${java.class.path}"/>
  </path>

  <target name="init">
    <available property="junit.exists" 
      classname="junit.framework.TestSuite"/>
  </target>

  <target name="test-junit" if="junit.exists">
    <mkdir dir="_ext"/>
    <junit fork="yes" haltonfailure="yes" printsummary="yes" dir="build/test">
      <test name="${testclass}"/>
      <classpath refid="classpath"/>
      <formatter type="plain"/>
    </junit>
  </target>
  
  <target name="complain" unless="junit.exists">
    <echo message="Can not run 'junit' task (tests skipped) please add junit.jar to ANT_HOME/lib"/> 
  </target>

  <target name="test" depends="init,test-junit,complain"/>

</project>

Other Friki examples (source code examples)

Here is a short list of links related to this Friki localtest.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.