jstrachan 02/05/21 01:01:31
Modified: jelly build.xml
Added: jelly project.properties README.txt build-gump.xml
LICENSE.txt gump.xml project.xml build-old.xml
jelly/xdocs index.xml navigation.xml overview.xml
Removed: jelly PROPOSAL.html build.properties.sample STATUS.html
OVERVIEW.html
Log:
Ported the build system to Maven.
Also moved the non-core taglibs into src/taglibs where there will be seperate build
files for each optional taglib.
Revision Changes Path
1.21 +152 -486 jakarta-commons-sandbox/jelly/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/jelly/build.xml,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- build.xml 20 May 2002 16:39:11 -0000 1.20
+++ build.xml 21 May 2002 08:01:31 -0000 1.21
@@ -1,494 +1,160 @@
-<project name="Jelly" default="compile" basedir=".">
+<?xml version="1.0"?>
-<!--
- "Jelly" component of the Jakarta Commons Subproject
- $Id: build.xml,v 1.20 2002/05/20 16:39:11 jstrachan Exp $
--->
+<project name="Jelly" default="maven:jar" basedir=".">
-<!-- ========== Initialize Properties ===================================== -->
+ <!-- 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" />
- <property file="build.properties"/> <!-- Component local -->
- <property file="../build.properties"/> <!-- Commons local -->
- <property file="${user.home}/build.properties"/> <!-- User local -->
-
-
-<!-- ========== External Dependencies ===================================== -->
-
-
- <!-- The directories corresponding to your necessary dependencies -->
- <property name="jaxp.home" value="/usr/local/jaxp1.1"/>
- <property name="jdk.home" value="/usr/local/jdk1.3"/>
- <property name="junit.home" value="/usr/local/junit3.7"/>
- <property name="bsf.home" value="/usr/local/bsf"/>
-
- <property name="commons.home" value="../../jakarta-commons"/>
- <property name="sandbox.home" value=".."/>
- <property name="beanutils.home" value="${commons.home}/beanutils"/>
- <property name="collections.home" value="${commons.home}/collections"/>
- <property name="logging.home" value="${commons.home}/logging"/>
- <property name="digester.home" value="${commons.home}/digester"/>
- <property name="jexl.home" value="${sandbox.home}/jexl"/>
-
- <!-- 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"/>
- <property name="database.jar" value="/java/hsqldb/hsqldb.jar"/>
-
-<!-- ========== Derived Values ============================================ -->
-
-
- <!-- The locations of necessary jar files -->
- <property name="jdk.api" value="${jdk.home}/docs/api"/>
- <property name="tools.jar" value="${jdk.home}/lib/tools.jar"/>
- <property name="jaxp.jaxp.jar" value="${jaxp.home}/jaxp.jar"/>
- <property name="jaxp.parser.jar" value="${jaxp.home}/crimson.jar"/>
- <property name="jaxp.api" value="${jaxp.home}/docs/api"/>
- <property name="junit.jar" value="${junit.home}/junit.jar"/>
- <property name="bsf.jar" value="${bsf.home}/bsf.jar"/>
- <property name="commons-beanutils.api" value="${beanutils.home}/dist/docs/api"/>
- <property name="commons-beanutils.jar"
value="${beanutils.home}/dist/commons-beanutils.jar"/>
- <property name="commons-collections.api"
value="${collections.home}/dist/docs/api"/>
- <property name="commons-collections.jar"
value="${collections.home}/dist/commons-collections.jar"/>
- <property name="commons-logging.api" value="${logging.home}/dist/docs/api"/>
- <property name="commons-logging.jar"
value="${logging.home}/dist/commons-logging.jar"/>
- <property name="commons-digester.api" value="${digester.home}/dist/docs/api"/>
- <property name="commons-digester.jar"
value="${digester.home}/dist/commons-digester.jar"/>
- <property name="commons-jexl.jar"
value="${jexl.home}/dist/commons-jexl.jar"/>
- <property name="velocity-dep.jar"
value="/java/velocity/velocity-dep-1.4-dev.jar"/>
-
- <!-- ObjectBridge jar for optional OJB tags -->
+ <!-- maven:start -->
- <property name="ojb.jar" value="/java/ojb/ojb.jar"/>
-
-
-
-<!-- ========== Component Declarations ==================================== -->
-
-
- <!-- The name of this component -->
- <property name="component.name" value="jelly"/>
-
- <!-- The primary package name of this component -->
- <property name="component.package" value="org.apache.commons.jelly"/>
-
- <!-- The title of this component -->
- <property name="component.title" value="Jelly - simple tag based Java and
XML scripting engine"/>
-
- <!-- The current version number of this component -->
- <property name="component.version" value="1.0-dev"/>
-
- <!-- The base directory for compilation targets -->
- <property name="build.home" value="target"/>
-
- <!-- The base directory for component configuration files -->
- <property name="conf.home" value="src/conf"/>
-
- <!-- The base directory for distribution targets -->
- <property name="dist.home" value="dist"/>
-
- <!-- The base directory for component sources -->
- <property name="source.home" value="src/java"/>
-
- <!-- The base directory for unit test sources -->
- <property name="test.home" value="src/test"/>
-
-
-<!-- ========== Compiler Defaults ========================================= -->
-
-
- <!-- Should Java compilations set the 'debug' compiler option? -->
- <property name="compile.debug" value="true"/>
-
- <!-- Should Java compilations set the 'deprecation' compiler option? -->
- <property name="compile.deprecation" value="false"/>
-
- <!-- Should Java compilations set the 'optimize' compiler option? -->
- <property name="compile.optimize" value="true"/>
-
- <!-- Construct compile classpath -->
- <path id="compile.classpath">
- <pathelement location="${build.home}/classes"/>
- <pathelement location="${jaxp.jaxp.jar}"/>
- <pathelement location="${jaxp.parser.jar}"/>
- <pathelement location="${dom4j.jar}"/>
- <pathelement location="${jexl.jar}"/>
- <pathelement location="${velocity-dep.jar}"/>
- <pathelement location="${commons-beanutils.jar}"/>
- <pathelement location="${commons-collections.jar}"/>
- <pathelement location="${commons-logging.jar}"/>
- <pathelement location="${commons-digester.jar}"/>
- <pathelement location="${junit.jar}"/>
-
- <!-- optional JARs -->
- <pathelement location="${ojb.jar}"/>
-
- <pathelement location="${beanshell.jar}"/>
-
- <pathelement location="${bsf.jar}"/>
- <pathelement location="${pnuts.jar}"/>
- <pathelement location="${rhino.jar}"/>
- <pathelement location="${tools.jar}"/>
- </path>
-
-
-<!-- ========== Test Execution Defaults =================================== -->
-
-
- <!-- Construct unit test classpath -->
- <path id="test.classpath">
- <pathelement location="${build.home}/classes"/>
- <pathelement location="${build.home}/tests"/>
- <pathelement location="${build.home}/classes"/>
- <pathelement location="${jaxp.jaxp.jar}"/>
- <pathelement location="${jaxp.parser.jar}"/>
- <pathelement location="${dom4j.jar}"/>
- <pathelement location="${jexl.jar}"/>
- <pathelement location="${velocity-dep.jar}"/>
- <pathelement location="${commons-beanutils.jar}"/>
- <pathelement location="${commons-collections.jar}"/>
- <pathelement location="${commons-logging.jar}"/>
- <pathelement location="${commons-digester.jar}"/>
- <pathelement location="${junit.jar}"/>
-
- <pathelement location="${database.jar}"/>
-
-
- <!-- optional JARs -->
- <pathelement location="${ojb.jar}"/>
-
- <pathelement location="${beanshell.jar}"/>
- <pathelement location="${bsf.jar}"/>
- <pathelement location="${pnuts.jar}"/>
- <pathelement location="${rhino.jar}"/>
- <pathelement location="${tools.jar}"/>
- </path>
-
- <!-- Should all tests fail if one does? -->
- <property name="test.failonerror" value="true"/>
-
- <!-- The test runner to execute -->
- <property name="test.runner" value="junit.textui.TestRunner"/>
-
-
-<!-- ========== Source files to be compiled =============================== -->
- <patternset id="javac.source.files">
- <!-- Optionally includes engines based on dependencies being present -->
- <exclude name="**/ojb/**" unless="ojb.present"/>
-
- <exclude name="**/beanshell/**" unless="beanshell.present"/>
-
- <exclude name="**/bsf/**" unless="bsf.present"/>
-
- </patternset>
-
-<!-- ========== Executable Targets ======================================== -->
-
-
- <target name="init"
- description="Initialize and evaluate conditionals">
- <echo message="-------- ${component.name} ${component.version} --------"/>
- <filter token="name" value="${component.package}"/>
- <filter token="version" value="${component.version}"/>
-
- <!-- set the conditional compilations -->
-
-
- <available property="ojb.present"
-
- classpathref="compile.classpath"
-
- classname="ojb.broker.PersistenceBroker"/>
-
-
-
- <available property="bsf.present"
-
- classpathref="compile.classpath"
-
- classname="com.ibm.bsf.BSFEngine"/>
-
-
- <available property="beanshell.present"
- classpathref="compile.classpath"
- classname="bsh.Interpreter"/>
-
- <available property="jpython.present"
- classpathref="compile.classpath"
- classname="org.python.util.PythonInterpreter"/>
-
- <available property="pnuts.present"
- classpathref="compile.classpath"
- classname="pnuts.ext.PnutsBSFEngine"/>
-
- <available property="rhino.present"
- classpathref="compile.classpath"
- classname="org.mozilla.javascript.Scriptable"/>
- </target>
-
- <!-- Warn the user about items not being compiled -->
- <target name="checkOjb" unless="obj.present">
-
- <echo message="Warning: OJB dependencies were not resolved."/>
-
- </target>
-
- <target name="checkBsf" unless="bsf.present">
-
- <echo message="Warning: BSF dependencies were not resolved."/>
-
- </target>
-
- <target name="checkBeanShell" unless="beanshell.present">
- <echo message="Warning: BeanShell dependencies were not resolved."/>
- </target>
- <target name="checkJPython" unless="jpython.present">
-<!--
- <echo message="Warning: JPython dependencies were not resolved."/>
--->
- </target>
- <target name="checkRhino" unless="rhino.present">
- <echo message="Warning: Rhino dependencies were not resolved."/>
- </target>
- <target name="checkPNuts" unless="pnuts.present">
- <echo message="Warning: PNuts dependencies were not resolved."/>
- </target>
- <target name="checkDependencies"
- depends="checkBsf, checkBeanShell, checkJPython, checkRhino"
- description="Checks for dependend (but non-essential) JARs are present"/>
-
-
- <target name="prepare" depends="init"
- description="Prepare build directory">
- <mkdir dir="${build.home}"/>
- <mkdir dir="${build.home}/classes"/>
- <mkdir dir="${build.home}/conf"/>
- <mkdir dir="${build.home}/tests"/>
-
- <antcall target="checkDependencies"/>
- </target>
-
-
- <target name="static" depends="prepare"
- description="Copy static files to build directory">
- <tstamp/>
- <copy todir="${build.home}/conf" filtering="on">
- <fileset dir="${conf.home}" includes="*.MF"/>
- </copy>
- </target>
-
-
- <target name="compile" depends="static"
- description="Compile shareable components">
- <javac srcdir="${source.home}"
- destdir="${build.home}/classes"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}">
- <classpath refid="compile.classpath"/>
- </javac>
- <copy todir="${build.home}/classes" filtering="on">
- <fileset dir="${source.home}" excludes="**/*.java"/>
- </copy>
- </target>
-
-
- <target name="compile.tests" depends="compile"
- description="Compile unit test cases">
- <javac srcdir="${test.home}"
- destdir="${build.home}/tests"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}">
- <classpath refid="test.classpath"/>
- </javac>
- <copy todir="${build.home}/tests" filtering="on">
- <fileset dir="${test.home}" excludes="**/*.java"/>
- </copy>
- </target>
-
-
- <target name="clean"
- description="Clean build and distribution directories">
- <delete dir="${build.home}"/>
- <delete dir="${dist.home}"/>
- </target>
-
-
- <target name="all" depends="clean,compile"
- description="Clean and compile all components"/>
-
-
- <target name="javadoc" depends="compile"
- description="Create component Javadoc documentation">
- <mkdir dir="${dist.home}"/>
- <mkdir dir="${dist.home}/docs"/>
- <mkdir dir="${dist.home}/docs/api"/>
- <javadoc sourcepath="${source.home}"
- destdir="${dist.home}/docs/api"
- packagenames="org.*, javax.*"
- author="true"
- private="true"
- version="true"
- doctitle="<h1>${component.title}</h1>"
- windowtitle="${component.title} (Version ${component.version})"
- bottom="Copyright (c) 2002 - Apache Software Foundation">
- <link offline="true" packagelistLoc="${commons-beanutils.api}"
- href="http://jakarta.apache.org/commons/beanutils/api/"/>
- <link offline="true" packagelistLoc="${commons-collections.api}"
- href="http://jakarta.apache.org/commons/collections/api/"/>
- <link offline="true" packagelistLoc="${commons-logging.api}"
- href="http://jakarta.apache.org/commons/logging/api/"/>
- <link offline="true" packagelistLoc="${jdk.api}"
- href="http://java.sun.com/products/jdk/1.3/docs/api"/>
- <link offline="true" packagelistLoc="${jaxp.api}"
- href="http://java.sun.com/xml/jaxp-docs-1.1/docs/api"/>
- <classpath refid="compile.classpath"/>
- </javadoc>
- </target>
-
-
- <target name="dist" depends="compile,javadoc"
- description="Create binary distribution">
- <mkdir dir="${dist.home}"/>
- <copy file="../LICENSE"
- todir="${dist.home}"/>
- <mkdir dir="${build.home}/classes/META-INF"/>
- <copy file="../LICENSE"
- tofile="${build.home}/classes/META-INF/LICENSE.txt"/>
- <jar jarfile="${dist.home}/commons-${component.name}.jar"
- basedir="${build.home}/classes"
- manifest="${build.home}/conf/MANIFEST.MF"/>
- </target>
-
-
-<!-- ========== Unit Test Targets ========================================= -->
-
-
- <target name="test" depends="compile.tests"
- description="Run all unit test cases">
- <java classname="org.apache.commons.jelly.TestAll" fork="yes"
failonerror="${test.failonerror}">
- <classpath refid="test.classpath"/>
- </java>
- </target>
-
-
- <target name="test.xml" depends="compile.tests"
- description="Runs the test of the XML tags">
- <java classname="org.apache.commons.jelly.TestXMLTags" fork="yes">
- <classpath refid="test.classpath"/>
- <sysproperty key="org.apache.commons.logging.simplelog.defaultlog"
value="debug"/>
- </java>
- </target>
-
- <target name="test.define" depends="compile.tests"
- description="Runs the test of the define tags to test dynamic tags">
- <java classname="org.apache.commons.jelly.define.TestDynamicTags" fork="yes">
- <classpath refid="test.classpath"/>
- <!--
- <sysproperty key="org.apache.commons.logging.simplelog.defaultlog"
value="debug"/>
- -->
- </java>
- </target>
-
- <target name="test.beanshell" depends="compile.tests"
- description="Runs the BeanShell EL tests">
- <java classname="org.apache.commons.jelly.beanshell.TestBeanShellEL" fork="yes">
- <classpath refid="test.classpath"/>
- <sysproperty key="org.apache.commons.logging.log"
value="org.apache.commons.logging.impl.SimpleLog"/>
- <sysproperty key="org.apache.commons.logging.simplelog.defaultlog"
value="debug"/>
- </java>
- </target>
-
-<!-- ========== Sample Program Targets ==================================== -->
-
- <target name="demo.all" depends="compile"
- description="Runs all the demo scripts inside one single script">
- <java classname="org.apache.commons.jelly.Jelly" fork="yes">
- <classpath refid="test.classpath"/>
- <arg value="src/test/org/apache/commons/jelly/run_all.jelly"/>
- <arg value="one"/>
- <arg value="two"/>
- <arg value="three"/>
- </java>
- </target>
-
- <target name="demo.hw" depends="compile"
- description="Runs the Hello World demo">
- <java classname="org.apache.commons.jelly.Jelly" fork="yes">
- <classpath refid="test.classpath"/>
- <arg value="src/test/org/apache/commons/jelly/hello_world.jelly"/>
- </java>
- </target>
-
- <target name="demo.1" depends="compile"
- description="Runs demo #1">
- <java classname="org.apache.commons.jelly.Jelly" fork="yes">
- <classpath refid="test.classpath"/>
- <arg value="src/test/org/apache/commons/jelly/example2.jelly"/>
- </java>
- </target>
-
- <target name="demo.2" depends="compile"
- description="Runs demo #2">
- <java classname="org.apache.commons.jelly.Jelly" fork="yes">
- <classpath refid="test.classpath"/>
- <arg value="src/test/org/apache/commons/jelly/testing123.jelly"/>
- <arg value="one"/>
- <arg value="two"/>
- <arg value="three"/>
- </java>
- </target>
-
- <target name="demo.3" depends="compile"
- description="Runs demo #3">
- <java classname="org.apache.commons.jelly.Jelly" fork="yes">
- <classpath refid="test.classpath"/>
- <arg value="src/test/org/apache/commons/jelly/example3.jelly"/>
- <arg value="one"/>
- <arg value="two"/>
- <arg value="three"/>
- </java>
- </target>
-
- <target name="demo.sysprop" depends="compile"
- description="Runs 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/show_properties.jelly"/>
- </java>
- </target>
-
- <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>
-
+ <!-- ================================================================== -->
+ <!-- D E L E G A T O R S -->
+ <!-- ================================================================== -->
+
+ <target name="maven:gump-descriptor">
+ <ant antfile="${maven.home}/plugins/core/build.xml"
target="gump-descriptor"/>
+ </target>
+
+ <target name="maven:maven-update">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="maven-update"/>
+ </target>
+
+ <target name="maven:update-jars">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="update-jars"/>
+ </target>
+
+ <target name="maven:jar">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="jar"/>
+ </target>
+
+ <target name="maven:docs-quick">
+ <ant antfile="${maven.home}/plugins/docs/build.xml" target="docs-quick"/>
+ </target>
+
+ <target name="maven:run-singletest">
+ <ant antfile="${maven.home}/pluginx/test/build.xml" target="run-singletest"/>
+ </target>
+
+ <target name="maven:compile">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="compile"/>
+ </target>
+
+ <target name="maven:fo">
+ <ant antfile="${maven.home}/plugins/docs/build.xml" target="fo"/>
+ </target>
+
+ <target name="maven:cvs-change-log">
+ <ant antfile="${maven.home}/plugins/docs/build.xml" target="cvs-change-log"/>
+ </target>
+
+ <target name="maven:war">
+ <ant antfile="${maven.home}/plugins/j2ee/build.xml" target="war"/>
+ </target>
+
+ <target name="maven:generate-reactor">
+ <ant antfile="${maven.home}/plugins/reactor/build.xml"
target="generate-reactor"/>
+ </target>
+
+ <target name="maven:cross-ref">
+ <ant antfile="${maven.home}/plugins/docs/build.xml" target="cross-ref"/>
+ </target>
+
+ <target name="maven:deploy-site">
+ <ant antfile="${maven.home}/plugins/docs/build.xml" target="deploy-site"/>
+ </target>
+
+ <target name="maven:ear">
+ <ant antfile="${maven.home}/plugins/j2ee/build.xml" target="ear"/>
+ </target>
+
+ <target name="maven:install-jar">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="install-jar"/>
+ </target>
+
+ <target name="maven:task-list">
+ <ant antfile="${maven.home}/plugins/docs/build.xml" target="task-list"/>
+ </target>
+
+ <target name="maven:docs">
+ <ant antfile="${maven.home}/plugins/docs/build.xml" target="docs"/>
+ </target>
+
+ <target name="maven:site">
+ <ant antfile="${maven.home}/plugins/docs/build.xml" target="site"/>
+ </target>
+
+ <target name="maven:deploy-dist">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="deploy-dist"/>
+ </target>
+
+ <target name="maven:javadocs">
+ <ant antfile="${maven.home}/plugins/docs/build.xml" target="javadocs"/>
+ </target>
+
+ <target name="maven:announce">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="announce"/>
+ </target>
+
+ <target name="maven:check-source">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="check-source"/>
+ </target>
+
+ <target name="maven:dist">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="dist"/>
+ </target>
+
+ <target name="maven:dist-build">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="dist-build"/>
+ </target>
+
+ <target name="maven:metrics">
+ <ant antfile="${maven.home}/plugins/metrics/build.xml" target="metrics"/>
+ </target>
+
+ <target name="maven:clean">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="clean"/>
+ </target>
+
+ <target name="maven:env">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="env"/>
+ </target>
+
+ <target name="maven:test">
+ <ant antfile="${maven.home}/pluginx/test/build.xml" target="test"/>
+ </target>
+
+ <target name="maven:pdf">
+ <ant antfile="${maven.home}/plugins/docs/build.xml" target="pdf"/>
+ </target>
+
+ <target name="maven:iutest">
+ <ant antfile="${maven.home}/plugins/iutest/build.xml" target="iutest"/>
+ </target>
+
+ <target name="maven:activity-log">
+ <ant antfile="${maven.home}/plugins/docs/build.xml" target="activity-log"/>
+ </target>
+
+ <target name="maven:verify-project">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="verify-project"/>
+ </target>
+
+ <target name="maven:validate-pom">
+ <ant antfile="${maven.home}/plugins/core/build.xml" target="validate-pom"/>
+ </target>
+
+ <target name="maven:validate-war">
+ <ant antfile="${maven.home}/plugins/j2ee/build.xml" target="validate-war"/>
+ </target>
+
- <target name="demo.sql" depends="compile"
- description="Runs an SQL demo">
- <taskdef
- name="jelly"
- classname="org.apache.commons.jelly.task.JellyTask">
- <classpath refid="test.classpath"/>
- </taskdef>
+ <!-- maven:end -->
- <jelly file="src/test/org/apache/commons/jelly/sql/example.jelly"
output="${build.home}/sqloutput.xml"/>
- <jelly file="src/test/org/apache/commons/jelly/sql/example2.jelly"
output="${build.home}/sqloutput2.xml"/>
- <jelly file="src/test/org/apache/commons/jelly/sql/testSql.jelly"
output="${build.home}/sqloutput3.xml"/>
- </target>
</project>
1.1 jakarta-commons-sandbox/jelly/project.properties
Index: project.properties
===================================================================
# -------------------------------------------------------------------
# P R O J E C T P R O P E R T I E S
# -------------------------------------------------------------------
compile.debug = on
compile.optimize = off
compile.deprecation = off
maven.jarResources.basedir=${basedir}/src/java
1.1 jakarta-commons-sandbox/jelly/README.txt
Index: README.txt
===================================================================
Jelly
=====
Jelly is build using Maven. So all you should need to do is
install Ant and Maven and just type
ant
For more help using Maven please go to
http://jakarta.apache.org/turbine/maven/index.html
Enjoy!
1.1 jakarta-commons-sandbox/jelly/build-gump.xml
<<Binary file>>
1.1 jakarta-commons-sandbox/jelly/LICENSE.txt
Index: LICENSE.txt
===================================================================
/*
* $Header: /home/cvs/jakarta-commons/LICENSE,v 1.4 2002/04/11 13:24:02 dion Exp $
* $Revision: 1.4 $
* $Date: 2002/04/11 13:24:02 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
1.1 jakarta-commons-sandbox/jelly/gump.xml
Index: gump.xml
===================================================================
<module name="commons-jelly">
<description>Commons Jelly</description>
<url href="http://jakarta.apache.org/commons/jelly.html"/>
<cvs repository="jakarta"/>
<!-- This is really the cvs module. We need to change this but -->
<!-- I will leave this for now until everything works. -->
<project name="commons-jelly">
<!-- Standard Maven target to produce Javadocs, source -->
<!-- and binary distributions. -->
<ant buildfile="build-gump.xml" target="jar">
<property name="maven.final.name" value="commons-jelly-@@DATE@@"/>
</ant>
<package>org.apache.commons.jelly</package>
<!-- All Maven projects need Ant and Xerces to build. -->
<depend project="jakarta-ant"/>
<depend project="xml-xerces"/>
<depend project="commons-logging"/>
<depend project="commons-beanutils"/>
<depend project="commons-digester"/>
<depend project="dom4j"/>
<depend project="jdbc-stdext"/>
<work nested="target/classes"/>
<home nested="target"/>
<jar name="commons-jelly-@@DATE@@.jar"/>
<javadoc nested="docs/apidocs"/>
<nag from="Maven Developers <[EMAIL PROTECTED]>"
to="[EMAIL PROTECTED]"/>
</project>
</module>
1.1 jakarta-commons-sandbox/jelly/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project>
<version>2</version>
<name>commons-jelly</name>
<id>commons-jelly</id>
<currentVersion>1.0-dev</currentVersion>
<organization>
<name>Apache Software Foundation</name>
<url>http://www.apache.org</url>
</organization>
<inceptionYear>2002</inceptionYear>
<package>org.apache.commons.jelly</package>
<shortDescription>Commons Jelly</shortDescription>
<gumpRepositoryId>jakarta</gumpRepositoryId>
<description>Commons Jelly: simple XML scripting engine</description>
<url>http://jakarta.apache.org/commons/sandbox/jelly.html</url>
<cvsWebUrl>http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/jelly/</cvsWebUrl>
<cvsModule>jakarta-commons-sandbox/jelly</cvsModule>
<issueTrackingUrl>http://nagoya.apache.org/</issueTrackingUrl>
<siteAddress>jakarta.apache.org</siteAddress>
<siteDirectory>/www/jakarta.apache.org/commons/sandbox/jelly/</siteDirectory>
<developers>
<developer>
<name>James Strachan</name>
<id>jstrachan</id>
<email>[EMAIL PROTECTED]</email>
<organization>SpiritSoft, Inc.</organization>
</developer>
<developer>
<name>Geir Magnusson Jr.</name>
<id>geirm</id>
<email>[EMAIL PROTECTED]</email>
<organization>Adeptra , Inc.</organization>
</developer>
</developers>
<dependencies>
<dependency>
<name>commons-logging</name>
<type>required</type>
<version>1.0</version>
<jar>commons-logging-1.0.jar</jar>
</dependency>
<dependency>
<name>commons-beanutils</name>
<type>required</type>
<version>20020520</version>
<jar>commons-beanutils-20020520.jar</jar>
</dependency>
<dependency>
<name>commons-collections</name>
<type>required</type>
<version>2.0</version>
<jar>commons-collections-2.0.jar</jar>
</dependency>
<dependency>
<name>commons-digester</name>
<type>required</type>
<version>1.2</version>
<jar>commons-digester-1.2.jar</jar>
</dependency>
<dependency>
<name>dom4j</name>
<type>required</type>
<version>1.4-dev</version>
<jar>dom4j-1.4-dev.jar</jar>
</dependency>
<dependency>
<name>commons-jexl</name>
<type>required</type>
<version>1.0-dev</version>
<jar>commons-jexl-1.0-dev.jar</jar>
</dependency>
<dependency>
<name>velocity</name>
<type>required</type>
<version>1.4-dev</version>
<jar>velocity-1.4-dev.jar</jar>
</dependency>
<dependency>
<name>jdbc-stdext</name>
<type>required</type>
<version>2.0</version>
<jar>jdbc2_0-stdext.jar</jar>
</dependency>
</dependencies>
<build>
<sourceDirectories>
<sourceDirectory>src/java</sourceDirectory>
</sourceDirectories>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<aspectSourceDirectories></aspectSourceDirectories>
<unitTestPatterns>
<unitTestPattern>include = **/*Test*.java</unitTestPattern>
</unitTestPatterns>
<jarResources>
<jarResource>include = **/*.properties</jarResource>
</jarResources>
<jars></jars>
<nagEmailAddress>[EMAIL PROTECTED]</nagEmailAddress>
</build>
</project>
1.1 jakarta-commons-sandbox/jelly/build-old.xml
Index: build-old.xml
===================================================================
<project name="Jelly" default="compile" basedir=".">
<!--
"Jelly" component of the Jakarta Commons Subproject
$Id: build.xml,v 1.20 2002/05/20 16:39:11 jstrachan Exp $
-->
<!-- ========== Initialize Properties ===================================== -->
<property file="build.properties"/> <!-- Component local -->
<property file="../build.properties"/> <!-- Commons local -->
<property file="${user.home}/build.properties"/> <!-- User local -->
<!-- ========== External Dependencies ===================================== -->
<!-- The directories corresponding to your necessary dependencies -->
<property name="jaxp.home" value="/usr/local/jaxp1.1"/>
<property name="jdk.home" value="/usr/local/jdk1.3"/>
<property name="junit.home" value="/usr/local/junit3.7"/>
<property name="bsf.home" value="/usr/local/bsf"/>
<property name="commons.home" value="../../jakarta-commons"/>
<property name="sandbox.home" value=".."/>
<property name="beanutils.home" value="${commons.home}/beanutils"/>
<property name="collections.home" value="${commons.home}/collections"/>
<property name="logging.home" value="${commons.home}/logging"/>
<property name="digester.home" value="${commons.home}/digester"/>
<property name="jexl.home" value="${sandbox.home}/jexl"/>
<!-- 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"/>
<property name="database.jar" value="/java/hsqldb/hsqldb.jar"/>
<!-- ========== Derived Values ============================================ -->
<!-- The locations of necessary jar files -->
<property name="jdk.api" value="${jdk.home}/docs/api"/>
<property name="tools.jar" value="${jdk.home}/lib/tools.jar"/>
<property name="jaxp.jaxp.jar" value="${jaxp.home}/jaxp.jar"/>
<property name="jaxp.parser.jar" value="${jaxp.home}/crimson.jar"/>
<property name="jaxp.api" value="${jaxp.home}/docs/api"/>
<property name="junit.jar" value="${junit.home}/junit.jar"/>
<property name="bsf.jar" value="${bsf.home}/bsf.jar"/>
<property name="commons-beanutils.api" value="${beanutils.home}/dist/docs/api"/>
<property name="commons-beanutils.jar"
value="${beanutils.home}/dist/commons-beanutils.jar"/>
<property name="commons-collections.api"
value="${collections.home}/dist/docs/api"/>
<property name="commons-collections.jar"
value="${collections.home}/dist/commons-collections.jar"/>
<property name="commons-logging.api" value="${logging.home}/dist/docs/api"/>
<property name="commons-logging.jar"
value="${logging.home}/dist/commons-logging.jar"/>
<property name="commons-digester.api" value="${digester.home}/dist/docs/api"/>
<property name="commons-digester.jar"
value="${digester.home}/dist/commons-digester.jar"/>
<property name="commons-jexl.jar"
value="${jexl.home}/dist/commons-jexl.jar"/>
<property name="velocity-dep.jar"
value="/java/velocity/velocity-dep-1.4-dev.jar"/>
<!-- ObjectBridge jar for optional OJB tags -->
<property name="ojb.jar" value="/java/ojb/ojb.jar"/>
<!-- ========== Component Declarations ==================================== -->
<!-- The name of this component -->
<property name="component.name" value="jelly"/>
<!-- The primary package name of this component -->
<property name="component.package" value="org.apache.commons.jelly"/>
<!-- The title of this component -->
<property name="component.title" value="Jelly - simple tag based Java and
XML scripting engine"/>
<!-- The current version number of this component -->
<property name="component.version" value="1.0-dev"/>
<!-- The base directory for compilation targets -->
<property name="build.home" value="target"/>
<!-- The base directory for component configuration files -->
<property name="conf.home" value="src/conf"/>
<!-- The base directory for distribution targets -->
<property name="dist.home" value="dist"/>
<!-- The base directory for component sources -->
<property name="source.home" value="src/java"/>
<!-- The base directory for unit test sources -->
<property name="test.home" value="src/test"/>
<!-- ========== Compiler Defaults ========================================= -->
<!-- Should Java compilations set the 'debug' compiler option? -->
<property name="compile.debug" value="true"/>
<!-- Should Java compilations set the 'deprecation' compiler option? -->
<property name="compile.deprecation" value="false"/>
<!-- Should Java compilations set the 'optimize' compiler option? -->
<property name="compile.optimize" value="true"/>
<!-- Construct compile classpath -->
<path id="compile.classpath">
<pathelement location="${build.home}/classes"/>
<pathelement location="${jaxp.jaxp.jar}"/>
<pathelement location="${jaxp.parser.jar}"/>
<pathelement location="${dom4j.jar}"/>
<pathelement location="${jexl.jar}"/>
<pathelement location="${velocity-dep.jar}"/>
<pathelement location="${commons-beanutils.jar}"/>
<pathelement location="${commons-collections.jar}"/>
<pathelement location="${commons-logging.jar}"/>
<pathelement location="${commons-digester.jar}"/>
<pathelement location="${junit.jar}"/>
<!-- optional JARs -->
<pathelement location="${ojb.jar}"/>
<pathelement location="${beanshell.jar}"/>
<pathelement location="${bsf.jar}"/>
<pathelement location="${pnuts.jar}"/>
<pathelement location="${rhino.jar}"/>
<pathelement location="${tools.jar}"/>
</path>
<!-- ========== Test Execution Defaults =================================== -->
<!-- Construct unit test classpath -->
<path id="test.classpath">
<pathelement location="${build.home}/classes"/>
<pathelement location="${build.home}/tests"/>
<pathelement location="${build.home}/classes"/>
<pathelement location="${jaxp.jaxp.jar}"/>
<pathelement location="${jaxp.parser.jar}"/>
<pathelement location="${dom4j.jar}"/>
<pathelement location="${jexl.jar}"/>
<pathelement location="${velocity-dep.jar}"/>
<pathelement location="${commons-beanutils.jar}"/>
<pathelement location="${commons-collections.jar}"/>
<pathelement location="${commons-logging.jar}"/>
<pathelement location="${commons-digester.jar}"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${database.jar}"/>
<!-- optional JARs -->
<pathelement location="${ojb.jar}"/>
<pathelement location="${beanshell.jar}"/>
<pathelement location="${bsf.jar}"/>
<pathelement location="${pnuts.jar}"/>
<pathelement location="${rhino.jar}"/>
<pathelement location="${tools.jar}"/>
</path>
<!-- Should all tests fail if one does? -->
<property name="test.failonerror" value="true"/>
<!-- The test runner to execute -->
<property name="test.runner" value="junit.textui.TestRunner"/>
<!-- ========== Source files to be compiled =============================== -->
<patternset id="javac.source.files">
<!-- Optionally includes engines based on dependencies being present -->
<exclude name="**/ojb/**" unless="ojb.present"/>
<exclude name="**/beanshell/**" unless="beanshell.present"/>
<exclude name="**/bsf/**" unless="bsf.present"/>
</patternset>
<!-- ========== Executable Targets ======================================== -->
<target name="init"
description="Initialize and evaluate conditionals">
<echo message="-------- ${component.name} ${component.version} --------"/>
<filter token="name" value="${component.package}"/>
<filter token="version" value="${component.version}"/>
<!-- set the conditional compilations -->
<available property="ojb.present"
classpathref="compile.classpath"
classname="ojb.broker.PersistenceBroker"/>
<available property="bsf.present"
classpathref="compile.classpath"
classname="com.ibm.bsf.BSFEngine"/>
<available property="beanshell.present"
classpathref="compile.classpath"
classname="bsh.Interpreter"/>
<available property="jpython.present"
classpathref="compile.classpath"
classname="org.python.util.PythonInterpreter"/>
<available property="pnuts.present"
classpathref="compile.classpath"
classname="pnuts.ext.PnutsBSFEngine"/>
<available property="rhino.present"
classpathref="compile.classpath"
classname="org.mozilla.javascript.Scriptable"/>
</target>
<!-- Warn the user about items not being compiled -->
<target name="checkOjb" unless="obj.present">
<echo message="Warning: OJB dependencies were not resolved."/>
</target>
<target name="checkBsf" unless="bsf.present">
<echo message="Warning: BSF dependencies were not resolved."/>
</target>
<target name="checkBeanShell" unless="beanshell.present">
<echo message="Warning: BeanShell dependencies were not resolved."/>
</target>
<target name="checkJPython" unless="jpython.present">
<!--
<echo message="Warning: JPython dependencies were not resolved."/>
-->
</target>
<target name="checkRhino" unless="rhino.present">
<echo message="Warning: Rhino dependencies were not resolved."/>
</target>
<target name="checkPNuts" unless="pnuts.present">
<echo message="Warning: PNuts dependencies were not resolved."/>
</target>
<target name="checkDependencies"
depends="checkBsf, checkBeanShell, checkJPython, checkRhino"
description="Checks for dependend (but non-essential) JARs are present"/>
<target name="prepare" depends="init"
description="Prepare build directory">
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/classes"/>
<mkdir dir="${build.home}/conf"/>
<mkdir dir="${build.home}/tests"/>
<antcall target="checkDependencies"/>
</target>
<target name="static" depends="prepare"
description="Copy static files to build directory">
<tstamp/>
<copy todir="${build.home}/conf" filtering="on">
<fileset dir="${conf.home}" includes="*.MF"/>
</copy>
<replace file="${build.home}/conf/MANIFEST.MF" token="@version"
value="${component.version}"/>
</target>
<target name="compile" depends="static"
description="Compile shareable components">
<javac srcdir="${source.home}"
destdir="${build.home}/classes"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}">
<classpath refid="compile.classpath"/>
</javac>
<copy todir="${build.home}/classes" filtering="on">
<fileset dir="${source.home}" excludes="**/*.java"/>
</copy>
</target>
<target name="compile.tests" depends="compile"
description="Compile unit test cases">
<javac srcdir="${test.home}"
destdir="${build.home}/tests"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}">
<classpath refid="test.classpath"/>
</javac>
<copy todir="${build.home}/tests" filtering="on">
<fileset dir="${test.home}" excludes="**/*.java"/>
</copy>
</target>
<target name="clean"
description="Clean build and distribution directories">
<delete dir="${build.home}"/>
<delete dir="${dist.home}"/>
</target>
<target name="all" depends="clean,compile"
description="Clean and compile all components"/>
<target name="javadoc" depends="compile"
description="Create component Javadoc documentation">
<mkdir dir="${dist.home}"/>
<mkdir dir="${dist.home}/docs"/>
<mkdir dir="${dist.home}/docs/api"/>
<javadoc sourcepath="${source.home}"
destdir="${dist.home}/docs/api"
packagenames="org.*, javax.*"
author="true"
private="true"
version="true"
doctitle="<h1>${component.title}</h1>"
windowtitle="${component.title} (Version ${component.version})"
bottom="Copyright (c) 2002 - Apache Software Foundation">
<link offline="true" packagelistLoc="${commons-beanutils.api}"
href="http://jakarta.apache.org/commons/beanutils/api/"/>
<link offline="true" packagelistLoc="${commons-collections.api}"
href="http://jakarta.apache.org/commons/collections/api/"/>
<link offline="true" packagelistLoc="${commons-logging.api}"
href="http://jakarta.apache.org/commons/logging/api/"/>
<link offline="true" packagelistLoc="${jdk.api}"
href="http://java.sun.com/products/jdk/1.3/docs/api"/>
<link offline="true" packagelistLoc="${jaxp.api}"
href="http://java.sun.com/xml/jaxp-docs-1.1/docs/api"/>
<classpath refid="compile.classpath"/>
</javadoc>
</target>
<target name="dist" depends="compile,javadoc"
description="Create binary distribution">
<mkdir dir="${dist.home}"/>
<copy file="../LICENSE"
todir="${dist.home}"/>
<mkdir dir="${build.home}/classes/META-INF"/>
<copy file="../LICENSE"
tofile="${build.home}/classes/META-INF/LICENSE.txt"/>
<jar jarfile="${dist.home}/commons-${component.name}.jar"
basedir="${build.home}/classes"
manifest="${build.home}/conf/MANIFEST.MF"/>
</target>
<!-- ========== Unit Test Targets ========================================= -->
<target name="test" depends="compile.tests"
description="Run all unit test cases">
<java classname="org.apache.commons.jelly.TestAll" fork="yes"
failonerror="${test.failonerror}">
<classpath refid="test.classpath"/>
</java>
</target>
<target name="test.xml" depends="compile.tests"
description="Runs the test of the XML tags">
<java classname="org.apache.commons.jelly.TestXMLTags" fork="yes">
<classpath refid="test.classpath"/>
<sysproperty key="org.apache.commons.logging.simplelog.defaultlog"
value="debug"/>
</java>
</target>
<target name="test.define" depends="compile.tests"
description="Runs the test of the define tags to test dynamic tags">
<java classname="org.apache.commons.jelly.define.TestDynamicTags" fork="yes">
<classpath refid="test.classpath"/>
<!--
<sysproperty key="org.apache.commons.logging.simplelog.defaultlog"
value="debug"/>
-->
</java>
</target>
<target name="test.beanshell" depends="compile.tests"
description="Runs the BeanShell EL tests">
<java classname="org.apache.commons.jelly.beanshell.TestBeanShellEL" fork="yes">
<classpath refid="test.classpath"/>
<sysproperty key="org.apache.commons.logging.log"
value="org.apache.commons.logging.impl.SimpleLog"/>
<sysproperty key="org.apache.commons.logging.simplelog.defaultlog"
value="debug"/>
</java>
</target>
<!-- ========== Sample Program Targets ==================================== -->
<target name="demo.all" depends="compile"
description="Runs all the demo scripts inside one single script">
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="test.classpath"/>
<arg value="src/test/org/apache/commons/jelly/run_all.jelly"/>
<arg value="one"/>
<arg value="two"/>
<arg value="three"/>
</java>
</target>
<target name="demo.hw" depends="compile"
description="Runs the Hello World demo">
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="test.classpath"/>
<arg value="src/test/org/apache/commons/jelly/hello_world.jelly"/>
</java>
</target>
<target name="demo.1" depends="compile"
description="Runs demo #1">
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="test.classpath"/>
<arg value="src/test/org/apache/commons/jelly/example2.jelly"/>
</java>
</target>
<target name="demo.2" depends="compile"
description="Runs demo #2">
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="test.classpath"/>
<arg value="src/test/org/apache/commons/jelly/testing123.jelly"/>
<arg value="one"/>
<arg value="two"/>
<arg value="three"/>
</java>
</target>
<target name="demo.3" depends="compile"
description="Runs demo #3">
<java classname="org.apache.commons.jelly.Jelly" fork="yes">
<classpath refid="test.classpath"/>
<arg value="src/test/org/apache/commons/jelly/example3.jelly"/>
<arg value="one"/>
<arg value="two"/>
<arg value="three"/>
</java>
</target>
<target name="demo.sysprop" depends="compile"
description="Runs 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/show_properties.jelly"/>
</java>
</target>
<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>
<target name="demo.sql" depends="compile"
description="Runs an SQL demo">
<taskdef
name="jelly"
classname="org.apache.commons.jelly.task.JellyTask">
<classpath refid="test.classpath"/>
</taskdef>
<jelly file="src/test/org/apache/commons/jelly/sql/example.jelly"
output="${build.home}/sqloutput.xml"/>
<jelly file="src/test/org/apache/commons/jelly/sql/example2.jelly"
output="${build.home}/sqloutput2.xml"/>
<jelly file="src/test/org/apache/commons/jelly/sql/testSql.jelly"
output="${build.home}/sqloutput3.xml"/>
</target>
</project>
1.1 jakarta-commons-sandbox/jelly/xdocs/index.xml
Index: index.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Jelly : Java and XML based scripting engine</title>
<author email="[EMAIL PROTECTED]">James Strachan</author>
</properties>
<body>
<section name="Jelly : Java and XML based scripting engine">
<p>
<b>Jelly</b>
</p>
<p><em>Jelly</em> is an XML based scripting and processing engine. Jelly borrows
many
good ideas from both JSP custom tags, Velocity, Cocoon and the
scripting engine inside XDoclet. Jelly can be used from the command line, inside
Ant or inside a Servlet.
</p>
<p>
Jelly is completely extendable via custom tags in a similar way to JSP.
Though Jelly is really simple and has no dependencies either Servlets or JSP.
</p>
<p>We hope Jelly can be both an XML processing and transformation engine, a HTTP
/ JMS / SOAP scripting engine as well as an XML based unit testing framework for
testing XML based applications and web services.</p>
</section>
</body>
</document>
1.1 jakarta-commons-sandbox/jelly/xdocs/navigation.xml
Index: navigation.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Jelly">
<title>Jelly</title>
<organizationLogo href="/images/jakarta-logo-blue.gif">Jakarta</organizationLogo>
<body>
<menu name="Documentation">
<item name="Overview" href="/overview.html"/>
</menu>
</body>
</project>
1.1 jakarta-commons-sandbox/jelly/xdocs/overview.xml
Index: overview.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Jelly Overview</title>
<author email="[EMAIL PROTECTED]">James Strachan</author>
</properties>
<body>
<section name="Jelly Overview">
<p>Jelly is an XML based <i>processing engine</i>. The basic idea is that XML
elements can be bound to a Java <i>action</i> which is a Java bean that performs
some function. Here's an example action</p>
<pre>public class FooTag extends TagSupport {
private int count;
public void setCount(int count) {
this.count = count;
}
public void run(Context context, XMLOutput output) throws Exception {
for ( int i = 0; i < count; i++ ) {
// evaluate body
getBody().run( context, output );
}
}
}</pre>
<p>Then in a Jelly script this tag could be used as follows:-</p>
<pre><f:foo count="123">
something...
</f:foo></pre>
<p>Jelly is totally extendable
via custom actions (in a similar way to JSP custom tags) as well as cleanly
integrating with scripting
languages such as Jexl, Velocity, pnuts, beanshell and via BSF (Bean Scripting
Framework)
languages like JavaScript & JPython</p>
</section>
<section name="Background">
<p>It seems quite common these days to define custom XML languages to perform
some kind of processing. Here are a few examples</p>
<ul>
<li><a href="http://jakarta.apache.org/ant/">Ant</a></li>
<li>XSLT</li>
<li><a href="http://www.w3.org/TR/xml-pipeline/">XML Pipeline language</a></li>
<li>JSTL and JSP custom tags</li>
<li>Latka, AntEater & other similar XML based unit testing frameworks</li>
<li>commons-workflow</li>
</ul>
<p>So the motivation behind Jelly was to create a simple XML based processing
engine that could be extended to support various custom actions. A fully
qualified XML element name can be mapped to a Java Bean (or DynaBean), the
attributes map to bean properties, once the bean is constructed and the
properties set it is executed via the Tag interfaces run() method. So custom
actions can perform all kinds of processing from lower level looping,
conditional logic and expression evaluations to higher level actions like post
processing their bodies, making
a HTTP, SOAP or JMS call, querying SQL databases etc.</p>
</section>
<section name="Comparisons">
<p>To try give you a better feel for what Jelly is, we'll compare and contrast
Jelly with other scripting engines and templating technologies.</p>
<section name="Jelly versus JSP">
<p>Similarities</p>
<ul>
<li>Jelly uses the concept of custom tag libraries from JSP and follows many
of the lessons learnt from the JSTL (JSP Standard Tag Library). Indeed JSTL
could be implemented in Jelly.</li>
</ul>
<p>Differences</p>
<ul>
<li>Jelly has no dependency on Servlets or JSP so Jelly can be run from the
command line, inside Ant, inside an applet or anywhere that Java code can be
ran.</li>
<li>Jelly tags are much simpler to write and use than JSP tags. Because JSP
must support scriptlets due to backwards compatibility issues, they are
implemented 'inside out' with 3 different interfaces (Tag, BodyTag,
IterationTag) to implement based on the kind of tag you are writing, together
with a fairly complex set of event-based methods that are called by the page
container. Jelly tags are very easy - just derive from TagSupport and
implement the run() method. Really simple!</li>
<li>Jelly is XML native both as the format of the scripts and the output
format, so its ideal for work with XML and XML based applications and web
services</li>
<li>Jelly tags can parse and compile their bodies for more optimal performance
and easier validation. So a tag can ignore whitespace, iterate over its body,
transform its body at compile time etc. So a Jelly tag can be a simple macro,
preprocessing
its body at compile time, such as to build smart HTML forms or to make SOAP
macros etc.</li>
</ul>
</section>
<section name="Jelly versus Velocity">
<p>Velocity could actually be used inside Jelly via custom tags which support
Velocity expressions, directives and scripts. However here's a head to head
comparison anyways.</p>
<p>Similarities</p>
<ul>
<li>Jelly allows Java objects to be manipulated in a Java-like manner just
like Velocity.</li>
<li>Jelly could have a <i>surface syntax</i> that looks similar to Velocity.
i.e. someone could make a parser of Jelly that had a look-and-feel of Velocity
for common directives and expressions.</li>
</ul>
<p>Differences</p>
<ul>
<li>Jelly provides an extensible tag mechanism to provide more poweful
scripting such as by supporting JSTL, XML, XPath, XSLT, SQL or SOAP service
scripting. In essence, Jelly uses XML tags to denote 'directives'.</li>
<li>Jelly has integrated support for other scripting languages such as
JavaScript, NetRexx, Jython etc.</li>
</ul>
</section>
</section>
<section name="Possible uses for Jelly">
<p>Jelly has various possible uses. Here's a few to think about</p>
<ul>
<li>SOAP scripting engine</li>
<li>HTTP and/or JMS based scripting and unit testing framework similar to Latka
and AntEater</li>
<li>XML or page templating system</li>
<li>Ant scripting</li>
<li>Alternative (very lightweight) implementation of JSTL that can be run from
Ant to generate static content</li>
<li>A workflow, EAI or integration, maybe integrated into commons-workflow</li>
<li>Code generation system, maybe an enhanced scripting engine for XDoclet</li>
</ul>
</section>
</body>
</document>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>