blob: 40dd056e917e9c3217fdf5d7b8b79a2132e3481e [file] [log] [blame]
<?xml version="1.0"?>
<project name="Jelly" default="maven:jar" basedir=".">
<!-- Give user a chance to override without editing this file
(and without typing -D each time they invoke a target) -->
<!-- Allow any user specific values to override the defaults -->
<property file="${user.home}/build.properties" />
<!-- Allow user defaults for this project -->
<property file="build.properties" />
<!-- Set default values for the build -->
<property file="project.properties" />
<path id="callback.classpath">
<pathelement path="${maven.build.dest}"/>
<pathelement path="${maven.src.dir}/java"/>
<pathelement path="${basedir}"/>
<path refid="maven.dependency.classpath"/>
<pathelement location="${lib.repo}/xmlParserAPIs-2.0.0.jar"/>
<pathelement location="${lib.repo}/xercesImpl-2.0.0.jar"/>
</path>
<!-- maven:start -->
<!-- ================================================================== -->
<!-- D E F I N E A N T T A S K S -->
<!-- ================================================================== -->
<taskdef
name="maven-ant"
classname="org.apache.maven.ant.Ant">
<classpath>
<pathelement location="${lib.repo}/maven.jar"/>
</classpath>
</taskdef>
<!-- ================================================================== -->
<!-- D E L E G A T O R S -->
<!-- ================================================================== -->
<target name="maven:gump-descriptor">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="gump-descriptor"/>
</target>
<target name="maven:maven-update">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="maven-update"/>
</target>
<target name="maven:update-jars">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="update-jars"/>
</target>
<target name="maven:jar">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="jar"/>
</target>
<target name="maven:docs-quick">
<maven-ant antfile="${maven.home}/plugins/docs/build.xml" target="docs-quick"/>
</target>
<target name="maven:run-singletest">
<maven-ant antfile="${maven.home}/plugins/test/build.xml" target="run-singletest"/>
</target>
<target name="maven:compile">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="compile"/>
</target>
<target name="maven:jar-resources">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="jar-resources"/>
</target>
<target name="maven:fo">
<maven-ant antfile="${maven.home}/plugins/docs/build.xml" target="fo"/>
</target>
<target name="maven:cvs-change-log">
<maven-ant antfile="${maven.home}/plugins/docs/build.xml" target="cvs-change-log"/>
</target>
<target name="maven:war">
<maven-ant antfile="${maven.home}/plugins/j2ee/build.xml" target="war"/>
</target>
<target name="maven:generate-reactor">
<maven-ant antfile="${maven.home}/plugins/reactor/build.xml" target="generate-reactor"/>
</target>
<target name="maven:cross-ref">
<maven-ant antfile="${maven.home}/plugins/docs/build.xml" target="cross-ref"/>
</target>
<target name="maven:deploy-site">
<maven-ant antfile="${maven.home}/plugins/docs/build.xml" target="deploy-site"/>
</target>
<target name="maven:ear">
<maven-ant antfile="${maven.home}/plugins/j2ee/build.xml" target="ear"/>
</target>
<target name="maven:install-jar">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="install-jar"/>
</target>
<target name="maven:task-list">
<maven-ant antfile="${maven.home}/plugins/docs/build.xml" target="task-list"/>
</target>
<target name="maven:docs">
<maven-ant antfile="${maven.home}/plugins/docs/build.xml" target="docs"/>
</target>
<target name="maven:site">
<maven-ant antfile="${maven.home}/plugins/docs/build.xml" target="site"/>
</target>
<target name="maven:deploy-dist">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="deploy-dist"/>
</target>
<target name="maven:javadocs">
<maven-ant antfile="${maven.home}/plugins/docs/build.xml" target="javadocs"/>
</target>
<target name="maven:announce">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="announce"/>
</target>
<target name="maven:check-source">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="check-source"/>
</target>
<target name="maven:dist">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="dist"/>
</target>
<target name="maven:dist-build">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="dist-build"/>
</target>
<target name="maven:metrics">
<maven-ant antfile="${maven.home}/plugins/metrics/build.xml" target="metrics"/>
</target>
<target name="maven:clean">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="clean"/>
</target>
<target name="maven:env">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="env"/>
</target>
<target name="maven:test">
<maven-ant antfile="${maven.home}/plugins/test/build.xml" target="test"/>
</target>
<target name="maven:pdf">
<maven-ant antfile="${maven.home}/plugins/docs/build.xml" target="pdf"/>
</target>
<target name="maven:iutest">
<maven-ant antfile="${maven.home}/plugins/uitest/build.xml" target="iutest"/>
</target>
<target name="maven:activity-log">
<maven-ant antfile="${maven.home}/plugins/docs/build.xml" target="activity-log"/>
</target>
<target name="maven:verify-project">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="verify-project"/>
</target>
<target name="maven:validate-pom">
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="validate-pom"/>
</target>
<target name="maven:validate-war">
<maven-ant antfile="${maven.home}/plugins/j2ee/build.xml" target="validate-war"/>
</target>
<!-- maven:end -->
<!-- ========== Helper Targets ============================================ -->
<target name="clean" depends="maven:clean">
<delete file="velocity.log"/>
</target>
<target name="compile" depends="maven:compile">
<path id="test.classpath">
<pathelement path="${maven.build.dest}"/>
<pathelement path="${maven.src.dir}/java"/>
<pathelement path="${basedir}"/>
<path refid="maven.dependency.classpath"/>
<pathelement location="${lib.repo}/xmlParserAPIs-2.0.0.jar"/>
<pathelement location="${lib.repo}/xercesImpl-2.0.0.jar"/>
</path>
<taskdef
name="jelly"
classname="org.apache.commons.jelly.task.JellyTask">
<classpath refid="test.classpath"/>
</taskdef>
</target>
<target name="compile.test" depends="compile"/>
<target name="test" depends="maven:test"/>
<target name="dist" depends="maven:dist-build"/>
<target name="site" depends="maven:site"/>
<!-- runs the XML doclet -->
<target name="xml-doclet" depends="compile">
<path id="doclet.classpath">
<pathelement path="${maven.build.dest}"/>
<path refid="maven.dependency.classpath"/>
</path>
<javadoc
sourcepath="src/java"
packagenames="org.apache.commons.jelly.tags.*"
doclet="org.apache.commons.jelly.util.XMLDoclet"
docletpathref="doclet.classpath">
</javadoc>
</target>
<!-- runs the Tag doclet -->
<target name="tag-doclet" depends="compile">
<path id="doclet.classpath">
<pathelement path="${maven.build.dest}"/>
<path refid="maven.dependency.classpath"/>
</path>
<javadoc
sourcepath="src/java"
packagenames="org.apache.commons.jelly.tags.*"
doclet="org.apache.commons.jelly.util.TagXMLDoclet"
docletpathref="doclet.classpath">
</javadoc>
</target>
<target name="doc-tags" depends="tag-doclet"
description="Generates the tag documentation">
<mkdir dir="target/generated-xdocs"/>
<jelly file="src/script/makeTagDoc.jelly" output="target/generated-xdocs/tags.xml"/>
</target>
<!-- ========== Specific Test cases ======================================= -->
<target name="test.expr"
description="Runs the Expression unit test">
<property name="maven.testcase" value="org.apache.commons.jelly.expression.TestExpressions"/>
<maven-ant antfile="${maven.home}/plugins/test/build.xml" target="run-singletest"/>
</target>
<target name="test.jsl"
description="Runs the JSL unit test">
<property name="maven.testcase" value="org.apache.commons.jelly.jsl.TestJSL"/>
<maven-ant antfile="${maven.home}/plugins/test/build.xml" target="run-singletest"/>
</target>
<target name="test.xml"
description="Runs the XML unit test">
<property name="maven.testcase" value="org.apache.commons.jelly.xml.TestXMLTags"/>
<maven-ant antfile="${maven.home}/plugins/test/build.xml" target="run-singletest"/>
</target>
<target name="test.define"
description="Runs the Define unit test">
<property name="maven.testcase" value="org.apache.commons.jelly.define.TestDynamicTags"/>
<maven-ant antfile="${maven.home}/plugins/test/build.xml" target="run-singletest"/>
</target>
<!-- ========== Sample Program Targets ==================================== -->
<target name="demo.hw" depends="compile"
description="Runs the Hello World demo">
<jelly file="src/test/org/apache/commons/jelly/hello_world.jelly"/>
</target>
<target name="demo.sysprop" depends="compile"
description="Runs the system properties demo">
<jelly file="src/test/org/apache/commons/jelly/show_properties.jelly" output="target/sysprop.html"/>
</target>
<target name="demo.ant" depends="compile"
description="Runs demo which displays Ant properties">
<jelly file="src/test/org/apache/commons/jelly/ant/show_properties.jelly" output="target/ant.html"/>
</target>
<target name="demo.ant.task" depends="compile"
description="Runs demo which invokes Ant tasks">
<jelly file="src/test/org/apache/commons/jelly/ant/example_tasks.jelly"/>
</target>
<target name="demo.ant.typo" depends="compile"
description="Runs demo which has typeo to test line numbering">
<jelly file="src/test/org/apache/commons/jelly/ant/typoTest.jelly"/>
</target>
<target name="demo.ant.files" depends="compile"
description="Runs Ant demo which scans files">
<jelly file="src/test/org/apache/commons/jelly/ant/filescanner.jelly"/>
</target>
<target name="demo.xml" depends="compile"
description="Runs a simple demo of the XML tags">
<jelly file="src/test/org/apache/commons/jelly/xml/example.jelly"/>
</target>
<target name="demo.thread" depends="compile"
description="Runs the threading demo">
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="test.classpath"/>
<arg value="src/test/org/apache/commons/jelly/testThread.jelly"/>
</java>
</target>
<target name="demo.file" depends="compile"
description="Runs the file demo">
<jelly file="src/test/org/apache/commons/jelly/testFile.jelly"/>
</target>
<target name="demo.betwixt" depends="compile"
description="Runs a demo using the XML tags to generate a Betwixt descriptor">
<property name="inputFile" value="src/test/org/apache/commons/jelly/xml/betwixt/input.xml"/>
<jelly file="src/test/org/apache/commons/jelly/xml/betwixt/makeBetwixt.jelly" output="target/PO.betwixt"/>
</target>
<target name="demo.jellybean" depends="compile"
description="Runs a demo showing the use of jellybean tags, beans with a run() method">
<!--
<jelly file="src/test/org/apache/commons/jelly/define/jellyBeanSample.jelly"/>
-->
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="test.classpath"/>
<arg value="src/test/org/apache/commons/jelly/define/jellyBeanSample.jelly"/>
</java>
</target>
<target name="demo.jsl" depends="compile"
description="Runs a simple demo of the JSL tags">
<jelly file="src/test/org/apache/commons/jelly/jsl/example.jelly"/>
</target>
<target name="demo.jsl.debug" depends="compile"
description="Runs a simple demo of the JSL tags with debugging on">
<jelly file="src/test/org/apache/commons/jelly/jsl/example.jelly"/>
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="test.classpath"/>
<arg value="src/test/org/apache/commons/jelly/jsl/example.jelly"/>
<!-- turn on debugging -->
<sysproperty key="org.apache.commons.logging.simplelog.defaultlog" value="debug"/>
<sysproperty key="org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester" value="warn"/>
<sysproperty key="org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester.sax" value="warn"/>
</java>
</target>
<target name="demo.jsl2" depends="compile"
description="Runs demo #2 of the JSL tags">
<jelly file="src/test/org/apache/commons/jelly/jsl/example2.jelly"/>
</target>
<target name="demo.sql" depends="compile"
description="Runs an SQL demo">
<!-- Values used for testing -->
<property name="databaseUrl" value="jdbc:hsqldb:hsql://localhost"/>
<property name="databaseDriver" value="org.hsqldb.jdbcDriver"/>
<property name="databaseUser" value="sa"/>
<property name="databaseTable" value="SYSTEM_TABLES"/>
<echo message="Running examples and outputting results to target directory"/>
<jelly file="src/test/org/apache/commons/jelly/sql/example.jelly" output="target/sqloutput.xml"/>
<jelly file="src/test/org/apache/commons/jelly/sql/example2.jelly" output="target/sqloutput2.xml"/>
<jelly file="src/test/org/apache/commons/jelly/sql/testSql.jelly" output="target/sqloutput3.xml"/>
</target>
<target name="demo.all" depends="compile"
description="Runs various example Jelly scripts">
<jelly file="src/test/org/apache/commons/jelly/run_all.jelly"/>
</target>
<target name="demo.werkz2">
<property name="maven.core.callback.post-compile.buildFile" value="build.xml"/>
<property name="maven.core.callback.post-compile.buildTarget" value="demo.werkz2.callback"/>
<maven-ant antfile="${maven.home}/plugins/core/build.xml" target="compile"/>
</target>
<target name="demo.werkz2.callback">
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="callback.classpath"/>
<arg value="src/test/org/apache/commons/jelly/werkz/example.jelly"/>
<arg value="test"/>
<arg value="compile"/>
</java>
</target>
<target name="demo.werkz" depends="compile"
description="Runs a Werkz sample">
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="test.classpath"/>
<arg value="src/test/org/apache/commons/jelly/werkz/example.jelly"/>
<arg value="compile"/>
<arg value="test"/>
</java>
</target>
<target name="demo.maven" depends="compile"
description="Runs a Maven example using Jelly and Werkz">
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="test.classpath"/>
<arg value="src/test/org/apache/commons/jelly/maven/project.jelly"/>
<arg value="compile"/>
<arg value="test"/>
</java>
</target>
<target name="demo.args" depends="compile"
description="Runs a demo of processing command line arguments">
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="test.classpath"/>
<arg value="src/test/org/apache/commons/jelly/show_args.jelly"/>
<arg value="one"/>
<arg value="two"/>
<arg value="three"/>
</java>
</target>
<!-- Schema validation demos using JARV and MSV -->
<target name="demo.validate.dtd" depends="compile"
description="Runs demo validation which uses DTD">
<jelly file="src/test/org/apache/commons/jelly/validate/validateDTD.jelly"/>
</target>
<target name="demo.validate.rng" depends="compile"
description="Runs demo validation which uses RelaxNG">
<jelly file="src/test/org/apache/commons/jelly/validate/validateRNG.jelly"/>
</target>
<!--
|| JMS examples
|| These examples require the 'jms.conf' which contains
|| the Messenger.xml directory as well as the 'jms.lib' which
|| contains all the jar and zip files that make up the JMS provider
-->
<target name="jms.init" depends="compile">
<property name="jms.conf" value="jms/conf"/>
<property name="jms.lib" value="jms/lib"/>
<echo>using JMS config dir ${jms.conf} and JMS library ${jms.lib}</echo>
<path id="jms.classpath">
<pathelement path="${maven.build.dest}"/>
<pathelement path="${maven.src.dir}/java"/>
<pathelement path="${basedir}"/>
<path refid="maven.dependency.classpath"/>
<fileset dir="${jms.lib}">
<include name="*.jar"/>
</fileset>
<pathelement path="${jms.conf}"/>
<pathelement location="${lib.repo}/xmlParserAPIs-2.0.0.jar"/>
<pathelement location="${lib.repo}/xercesImpl-2.0.0.jar"/>
</path>
<taskdef
name="jmsJelly"
classname="org.apache.commons.jelly.task.JellyTask">
<classpath refid="jms.classpath"/>
</taskdef>
</target>
<target name="demo.jms.receive" depends="jms.init"
description="Runs JMS receive demo">
<jmsJelly file="src/test/org/apache/commons/jelly/jms/receive.jelly"/>
</target>
<target name="demo.jms.receiveMap" depends="jms.init"
description="Runs JMS receive map message demo">
<jmsJelly file="src/test/org/apache/commons/jelly/jms/receiveMap.jelly"/>
</target>
<target name="demo.jms.receiveObject" depends="jms.init"
description="Runs JMS receive object message demo">
<jmsJelly file="src/test/org/apache/commons/jelly/jms/receiveObject.jelly"/>
</target>
<target name="demo.jms.send" depends="jms.init"
description="Runs JMS send message demo">
<jmsJelly file="src/test/org/apache/commons/jelly/jms/sendMessage.jelly"/>
</target>
<target name="demo.jms.sendMap" depends="jms.init"
description="Runs JMS send Map demo">
<jmsJelly file="src/test/org/apache/commons/jelly/jms/sendMap.jelly"/>
</target>
<target name="demo.jms.sendObject" depends="jms.init"
description="Runs JMS send Object demo">
<jmsJelly file="src/test/org/apache/commons/jelly/jms/sendObject.jelly"/>
</target>
<target name="demo.jms.sendText" depends="jms.init"
description="Runs JMS send text demo">
<jmsJelly file="src/test/org/apache/commons/jelly/jms/sendText.jelly"/>
</target>
<target name="demo.jms.flushQueue" depends="jms.init"
description="Runs JMS flush queue demo">
<jmsJelly file="src/test/org/apache/commons/jelly/jms/flushQueue.jelly"/>
</target>
<!--
old demos...
<target name="demo.pnuts" depends="compile, checkPNuts"
description="Runs a pnuts demo which displays system properties">
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="test.classpath"/>
<arg value="src/test/org/apache/commons/jelly/pnuts/example.jelly"/>
</java>
</target>
<target name="demo.javascript" depends="compile, checkRhino"
description="Runs a javascript demo which displays system properties">
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="test.classpath"/>
<arg value="src/test/org/apache/commons/jelly/javascript/example.jelly"/>
</java>
</target>
-->
</project>