<?xml version="1.0"?>

<project default="dist"
        xmlns:u="jelly:util"
  	xmlns:j="jelly:core">
  
    <goal name="dist" prereqs="jar:install,javaapp"/>

    <preGoal name="test:test">
        <attainGoal name="clirr:compiletestlibs"/>
    </preGoal>

    <goal name="clirr:compiletestlibs">
      <u:tokenize var="testlibs" delim=", ">${clirr.testlibs}</u:tokenize>
      <j:forEach items="${testlibs}" var="testlib" indexVar="testlibIdx">
Compiling test input ${testlib}
        <j:set var="testlibclassdir" value="${maven.build.dir}/testinput/${testlib}/classes"/>
        <mkdir dir="${testlibclassdir}"/>
        <javac 
          srcdir="${basedir}/src/testinput/${testlib}"
          destdir="${testlibclassdir}"/>
        <jar 
          basedir="${testlibclassdir}" 
          jarfile="${maven.build.dir}/testinput/${testlib}.jar" />
      </j:forEach>
    </goal>
    
    
 </project>
