blob: c96a1610ebd11bf4c7a9b5f6363fdc9e0a39c75d [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<project default="jar:jar">
<!-- The ClasspathResourceTestCase, TexenTestCase and AnakiaTestCase
require that some prerequisites are run before the actual test
cases (which compare only outputs) are executed.
-->
<preGoal name="test:test-resources">
<attainGoal name="anakiaTest"/>
<attainGoal name="texenTest"/>
<attainGoal name="texenClasspathTest"/>
</preGoal>
<!-- Initialize the anakia and texen tasks for use from maven -->
<goal name="init-tasks">
<path id="velocity-classpath">
<pathelement location="${maven.test.dest}"/>
<pathelement location="${maven.build.dest}"/>
<path refid="maven.dependency.classpath"/>
</path>
<taskdef name="texen" classname="org.apache.velocity.texen.ant.TexenTask">
<classpath>
<path refid="velocity-classpath"/>
</classpath>
</taskdef>
<taskdef name="texen-classpath" classname="org.apache.velocity.texen.ant.TexenTask">
<classpath>
<path refid="velocity-classpath"/>
<pathelement location="${basedir}/test/texen-classpath/test.jar"/>
</classpath>
</taskdef>
<taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
<classpath>
<path refid="velocity-classpath"/>
</classpath>
</taskdef>
</goal>
<!-- TexenTestCase -->
<goal name="texenTest"
prereqs="init-tasks">
<texen
contextProperties="${basedir}/test/texen/service.props,test/texen/additional.props"
controlTemplate="Control.vm"
outputDirectory="${maven.build.dir}/test/texen"
templatePath="${basedir}/test/texen/templates"
outputFile="report"
/>
</goal>
<!-- TexenClasspathTestCase -->
<goal name="texenClasspathTest"
prereqs="init-tasks">
<texen-classpath
useClassPath="true"
contextProperties="service.props"
controlTemplate="Control.vm"
outputDirectory="${basedir}/target/test/texen-classpath"
outputFile="report"
/>
</goal>
<!-- AnakiaTestCase -->
<goal name="anakiaTest"
prereqs="init-tasks">
<anakia basedir="test/anakia/xdocs" destdir="target/test/anakia"
extension=".html" style="site.vsl"
projectFile="stylesheets/project.xml"
excludes="**/stylesheets/**"
includes="**/*.xml"
templatePath="test/anakia/xdocs/stylesheets"
velocityPropertiesFile="test/anakia/velocity.properties"
lastModifiedCheck="false">
</anakia>
<anakia basedir="test/anakia/xdocs"
destdir="target/test/anakia"
extension=".context.html" style="site_contexts.vsl"
projectFile="stylesheets/project.xml"
excludes="**/stylesheets/**"
includes="**/*.xml"
templatePath="test/anakia/xdocs/stylesheets"
lastModifiedCheck="false">
<context name="customContext" file="stylesheets/customContext.xml"/>
</anakia>
</goal>
<!-- MultiLoader Test wants to load the contents of this jar from the
classpath. As we can't manipulate the class path for the junit tests, we
have to unjar the test jar in the test-classes directory.
See http://jira.codehaus.org/browse/MPTEST-57
-->
<postGoal name="test:test-resources">
<unjar src="test/cpload/test1.jar" dest="target/test-classes" />
</postGoal>
</project>