You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by he...@apache.org on 2006/03/05 20:59:48 UTC
svn commit: r383388 - in
/jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy: ./ README
build.properties build.xml ivy.xml lib/ lib/LICENSE.ivy lib/ivy-1.3-RC2.jar
Author: henning
Date: Sun Mar 5 11:59:47 2006
New Revision: 383388
URL: http://svn.apache.org/viewcvs?rev=383388&view=rev
Log:
This is an example patch to switch to the ivy dependency resolver for
building Velocity.
Advantage: We would get all the dependency downloading and resolving
features that maven has, in a nice rounded package. If might be
possible to do that with Maven Wagon too, if there were any docs on
how to use wagon inside ant (laughs).
Disadvantage: Increases the size of the source distribution by ~350k
because we must include the ivy jar.
Added:
jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/
jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/README
jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.properties (with props)
jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.xml (with props)
jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/ivy.xml (with props)
jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/lib/
jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/lib/LICENSE.ivy
jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/lib/ivy-1.3-RC2.jar (with props)
Added: jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/README
URL: http://svn.apache.org/viewcvs/jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/README?rev=383388&view=auto
==============================================================================
--- jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/README (added)
+++ jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/README Sun Mar 5 11:59:47 2006
@@ -0,0 +1,9 @@
+Copy all files in this directory into the "build" directory of the
+Velocity tree to use the ivy dependency resolver
+(http://www.jayasoft.org/ivy/) instead of our self-rolled ibiblio
+download. Make sure that the ivy jar ends up in build/lib
+
+ivy features a local file cache (just like maven), dependency checking
+and resolving and a lot more stuff. It also has an Apache friendly
+license.
+
Added: jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.properties
URL: http://svn.apache.org/viewcvs/jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.properties?rev=383388&view=auto
==============================================================================
--- jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.properties (added)
+++ jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.properties Sun Mar 5 11:59:47 2006
@@ -0,0 +1,101 @@
+# Copyright 2000-2005 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License")
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# This file is used by build.xml and testcases.xml
+#
+
+# Global defaults
+name= Velocity
+project= velocity
+version= 1.5-dev
+final.name= ${project}-${version}
+
+# compile switches
+debug= on
+optimize= on
+deprecation= off
+
+# Needs to be configured with system location of javacc for parser task
+javacc.home= *unset*
+
+velocity.build.dir= build
+
+build.dir= ${velocity.dir}/bin
+
+# The source tree runs through a filter copy task to
+# allow substitution of version, date etc. and will
+# end up in build.src
+build.src= ${build.dir}/src
+build.lib= ${build.dir}/lib
+build.test.src= ${build.dir}/test-src
+build.dest= ${build.dir}/classes
+build.deps= ${build.dir}/deps
+build.test.dest= ${build.dir}/test-classes
+build.javadoc= ${build.dir}/apidocs
+build.test= ${build.dir}/test
+build.test.reports= ${build.dir}/test-reports
+build.docs= ${build.dir}/docs
+
+# Various local pathes in the distribution
+src.java.dir= ${velocity.dir}/src/java
+src.parser.dir = ${velocity.dir}/src/parser
+test.java.dir= ${velocity.dir}/src/test
+test.dir= ${velocity.dir}/test
+example.dir= ${velocity.dir}/examples
+xdocs.dir= ${velocity.dir}/xdocs
+docs.dir= ${velocity.dir}/docs
+
+# @TODO Move parser build out of the tree.
+build.parser= ${src.java.dir}/org/apache/velocity/runtime/parser
+
+# Running the tests
+test.haltonerror= true
+test.haltonfailure= true
+
+# Building the distribution
+dist.root= ${build.dir}/dist
+dist.dir= ${dist.root}/${final.name}
+
+# Set to "project.xml" for distribution and "project-website.xml"
+# when building docs for web site
+docs.project= project.xml
+
+# Set to Sun Javadocs
+javadocs.ref.jsdk= http://java.sun.com/j2se/1.4.2/docs/api/
+
+########################################################################
+#
+# Downloading jars from ibiblio repository using the ivy resolver
+#
+########################################################################
+
+#
+# Settings for the proxy to use for download. Change this if you must
+# use a proxy from your host. If the proxy.host property is unset, no
+# proxy is used.
+proxy.host=
+proxy.port= 80
+
+#
+# Jars to be included in the velocity-dep jar
+jar.avalon-logkit.version= 2.1
+jar.commons-collections.version= 3.1
+jar.commons-lang.version= 2.1
+jar.oro.version= 2.0.8
+
+#
+# Where does ivy store its dependencies
+ivy.lib.dir= ${build.lib}
+
Propchange: jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.properties
------------------------------------------------------------------------------
svn:keywords = Id Author Date Revision
Added: jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.xml?rev=383388&view=auto
==============================================================================
--- jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.xml (added)
+++ jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.xml Sun Mar 5 11:59:47 2006
@@ -0,0 +1,824 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ Copyright 2000-2005 The Apache Software Foundation.
+
+ Licensed under the Apache License, Version 2.0 (the "License")
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- Build file for Velocity -->
+
+<!-- This project has its basedir set to the root directory -->
+<!-- of the velocity distribution. This is necessary so that -->
+<!-- all the code that uses relative directory references -->
+<!-- (like the tests) can be run in the same way when using -->
+<!-- the ant based build and the maven based build. -->
+<!-- *** DO NOT CHANGE THIS SETTING LIGHTLY! *** -->
+
+<project name="Velocity" default="world" basedir="..">
+
+ <path id="basedir-os">
+ <pathelement location="${basedir}" />
+ </path>
+ <!-- This is the relative base dir. This must be the root of the -->
+ <!-- Velocity distribution. All relative pathes are prefixed with -->
+ <!-- velocity.dir -->
+ <pathconvert property="velocity.dir" refid="basedir-os" targetos="unix"/>
+
+ <!-- Give user a chance to override without editing this file
+ (and without typing -D each time it compiles it -->
+ <property file="${user.home}/.ant.properties" />
+ <property file="${user.home}/build.properties" />
+ <property file=".ant.properties" />
+
+ <!-- This file contains all the defaults for building Velocity -->
+ <property file="build/build.properties" />
+
+ <property name="parserjj.file" value="${build.parser}/Parser.jj" />
+ <property name="parserjjt.file" value="${src.parser.dir}/Parser.jjt" />
+
+ <!-- =================================================================== -->
+ <!-- prints the targets available in this build file -->
+ <!-- =================================================================== -->
+ <target name="help">
+
+ <echo>
+ ****************************************************************************
+ **
+ ** help is no longer supported. Please run 'ant -projecthelp'
+ **
+ ***************************************************************************
+ </echo>
+ </target>
+
+ <target name="world" depends="jar,test,javadocs,docs,env"
+ description="Build the Velocity Jar and Documentation"/>
+
+ <!-- =================================================================== -->
+ <!-- prints the environment -->
+ <!-- =================================================================== -->
+ <target name="env" description="Prints build parameters">
+ <echo>
+ Global settings:
+ java.home = ${java.home}
+ user.home = ${user.home}
+ java.class.path = ${java.class.path}
+
+ Velocity settings:
+ Version: ${version}
+ Debug: ${debug}
+ Optimize: ${optimize}
+ Deprecation: ${deprecation}
+
+ Target settings (relative to build tree root):
+ Velocity Source: ${build.src}
+ Velocity Classes: ${build.dest}
+ Velocity API Docs: ${build.javadoc}
+ Velocity Docs: ${build.docs}
+ Velocity Test Reports: ${build.test.reports}
+ </echo>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Prepares the build directory -->
+ <!-- =================================================================== -->
+ <target name="prepare" depends="basic-prepare,prepare-jdbc,prepare-jdk14"/>
+
+ <!-- =================================================================== -->
+ <!-- sets up the build trees for sources and tests -->
+ <!-- =================================================================== -->
+ <target name="basic-prepare">
+ <tstamp>
+ <format property="build.time" pattern="yyyy-MM-dd HH:mm:ss" />
+ <format property="build.year" pattern="yyyy"/>
+ </tstamp>
+ <filter token="build.year" value="${build.year}"/>
+ <filter token="build.version" value="${version}"/>
+ <filter token="build.time" value="${build.time}"/>
+
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.dest}"/>
+ <mkdir dir="${build.src}"/>
+ <mkdir dir="${build.test.src}"/>
+ <mkdir dir="${build.test.dest}"/>
+
+ <copy todir="${build.src}" filtering="yes">
+ <fileset dir="${src.java.dir}">
+ <include name="**/*.java"/>
+ <exclude name="**/DataSourceResourceLoader.java"/>
+ <exclude name="**/JdkLogChute.java"/>
+ </fileset>
+ </copy>
+
+ <filter token="test.dir" value="${test.dir}"/>
+ <filter token="build.test" value="${build.test}"/>
+
+ <copy todir="${build.test.src}" filtering="yes">
+ <fileset dir="${test.java.dir}">
+ <include name="**/*.java"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- retrieves all required dependencies using the ivy engine -->
+ <!-- =================================================================== -->
+ <target name="retrieve-artifacts">
+ <!-- set up ivy -->
+ <path id="ivy.classpath">
+ <pathelement path="${classpath}"/>
+ <fileset dir="${velocity.build.dir}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <taskdef name="ivy-configure"
+ classname="fr.jayasoft.ivy.ant.IvyConfigure"
+ classpathref="ivy.classpath" loaderref="classpath.custom.ant.loaded"/>
+ <taskdef name="ivy-resolve"
+ classname="fr.jayasoft.ivy.ant.IvyResolve"
+ classpathref="ivy.classpath" loaderref="classpath.custom.ant.loaded"/>
+ <taskdef name="ivy-retrieve"
+ classname="fr.jayasoft.ivy.ant.IvyRetrieve"
+ classpathref="ivy.classpath" loaderref="classpath.custom.ant.loaded"/>
+
+ <!-- Pull artifacts in using ivy -->
+ <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
+ <ivy-configure />
+ <ivy-resolve file="${velocity.build.dir}/ivy.xml" />
+ <ivy-retrieve/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- sets up the build environment (classpath and libs) -->
+ <!-- =================================================================== -->
+ <target name="build-prepare" depends="retrieve-artifacts">
+
+ <!-- Build classpath -->
+ <path id="velocity.build.classpath">
+ <fileset dir="${build.lib}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <path id="velocity.run.classpath">
+ <path refid="velocity.build.classpath"/>
+ <pathelement location="${build.dir}/${final.name}.jar"/>
+ </path>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- checks for the existence/non-existence of various java features -->
+ <!-- -->
+ <!-- currently checks for -->
+ <!-- * javax.sql.Datasource (JDK1.4+, JDK1.3+JDBC2.0, J2EE 1.3+) -->
+ <!-- * java.util.logging.Logger (JDK 1.4+) -->
+ <!-- =================================================================== -->
+
+ <target name="prepare-jdbc" depends="check-jdbc,check-jdbc-true,check-jdbc-false"/>
+ <target name="prepare-jdk14" depends="check-jdk14,check-jdk14-true,check-jdk14-false"/>
+
+ <target name="check-jdbc" depends="build-prepare">
+ <!-- note: check to see if required class is available. -->
+ <!-- might be j2ee.jar, jdbc2_0-stdext.jar, or simply JDK 1.4+ -->
+ <available classname="javax.sql.DataSource"
+ property="jdbc.present">
+ <classpath refid="velocity.build.classpath"/>
+ </available>
+ </target>
+
+ <target name="check-jdbc-true" if="jdbc.present">
+ <copy todir="${build.src}" filtering="yes">
+ <fileset dir="${src.java.dir}">
+ <include name="**/DataSourceResourceLoader.java"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="check-jdbc-false" unless="jdbc.present">
+ <echo level="warning">
+ ********************************************************
+ **
+ ** The javax.sql.Datasource class has not been found on
+ ** your classpath. This means that your newly built
+ ** Velocity jar will not contain the JDBC based resource
+ ** loaders. If this is a problem, please use a JDK for
+ ** building that contains the javax.sql.Datasource class.
+ **
+ ********************************************************
+ </echo>
+ </target>
+
+ <target name="check-jdk14" depends="build-prepare">
+ <available classname="java.util.logging.Logger"
+ property="jdk14.present">
+ <classpath refid="velocity.build.classpath"/>
+ </available>
+ </target>
+
+ <target name="check-jdk14-true" if="jdk14.present">
+ <copy todir="${build.src}" filtering="yes">
+ <fileset dir="${src.java.dir}">
+ <include name="**/JdkLogChute.java"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="check-jdk14-false" unless="jdk14.present">
+ <echo level="warning">
+ ********************************************************
+ **
+ ** The java.util.logging.Logger class has not been found on your
+ ** classpath. This means that your newly built Velocity jar will
+ ** not contain JDK 1.4 compatible logging code. If this is a
+ ** problem, please use a 1.4 or newer JDK for building.
+ **
+ ********************************************************
+ </echo>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the source tree and the tests -->
+ <!-- =================================================================== -->
+ <target name="compile" depends="compile-src,compile-test"/>
+
+ <target name="compile-src" depends="prepare,build-prepare,check-jdbc,check-jdk14"
+ description="Compiles the Velocity source">
+ <javac srcdir="${build.src}"
+ destdir="${build.dest}"
+ encoding="UTF-8"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ classpathref="velocity.build.classpath"/>
+
+ <copy todir="${build.dest}" filtering="yes">
+ <fileset dir="${src.java.dir}">
+ <include name="**/*.properties"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="compile-test" depends="prepare,build-prepare,compile-src"
+ description="Compiles the Velocity test classes">
+ <javac srcdir="${build.test.src}"
+ destdir="${build.test.dest}"
+ encoding="UTF-8"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}">
+
+ <!-- Don't use the run classpath, build using the exploded class tree -->
+ <classpath>
+ <path refid="velocity.build.classpath"/>
+ <pathelement location="${build.dest}"/>
+ </classpath>
+ </javac>
+
+ <copy todir="${build.test.dest}" filtering="yes">
+ <fileset dir="${test.java.dir}">
+ <include name="**/*.properties"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- rebuilds the JJTree/JavaCC based parser -->
+ <!-- =================================================================== -->
+ <target name="parser" depends="parser-check,jjtree,javacc"
+ description="Rebuilds the JJTree/JavaCC based parser" />
+
+ <target name="parser-check">
+ <condition property="javacc-home-unset">
+ <equals arg1="${javacc.home}" arg2="*unset*" />
+ </condition>
+
+ <fail if="javacc-home-unset">
+ Could not run javacc:
+ ***********************************************************
+ ** You have not configured your JavaCC installation
+ ** location in the javacc.home property.
+ ***********************************************************
+ </fail>
+
+ <condition property="parser-task-runnable">
+ <and>
+ <available file="${javacc.home}" type="dir"/>
+
+ <!-- include a list of acceptable ant versions here -->
+ <or>
+ <contains string="${ant.version}" substring="1.6"/>
+ </or>
+ </and>
+ </condition>
+
+ <fail unless="parser-task-runnable">
+ Could not run javacc:
+ ***********************************************************
+ **
+ ** JavaCC 3.1 or later must be installed at ${javacc.home}.
+ ** Ant must be at least version 1.6.x.
+ **
+ ***********************************************************
+ </fail>
+
+ <echo>
+ ***********************************************************
+ ** Creating Parser.jj and Parser.java in source tree.
+ **
+ ** Note: ASTNode files generated by jjtree are
+ ** not generated with this task. To create new ASTNode files,
+ ** run jjtree manually then copy the relevant files into
+ ** the runtime/parser/node directory (deleting all other
+ ** generated files).
+ **
+ ***********************************************************
+ </echo>
+<!-- uncomment if generating the parser outside the source tree
+ <mkdir dir="${build.parser}"/>
+ <copy todir="${build.parser}" filtering="no">
+ <fileset dir="${build.src}/org/apache/velocity/runtime/parser">
+ <include name="**/*"/>
+ </fileset>
+ </copy>
+-->
+ </target>
+
+ <target name="jjtree" depends="parser-check">
+ <delete file="${parserjj.file}" />
+ <jjtree
+ target="${parserjjt.file}"
+ outputdirectory="${build.parser}"
+ javacchome="${javacc.home}"
+ buildnodefiles="false" />
+ </target>
+
+ <target name="javacc" depends="parser-check">
+ <javacc target="${parserjj.file}"
+ outputdirectory="${build.parser}"
+ javacchome="${javacc.home}" />
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- Gets the classes we need from the various support jars -->
+ <!-- ================================================================ -->
+ <target name="build-dependency-classes">
+ <mkdir dir="${build.deps}"/>
+ <unzip src="${build.lib}/commons-collections-${jar.commons-collections.version}.jar" dest="${build.deps}">
+ <!-- we only want a few files from commons collections -->
+ <patternset>
+ <include name="org/apache/commons/collections/BoundedMap.class" />
+ <include name="org/apache/commons/collections/ExtendedProperties*.class" />
+ <include name="org/apache/commons/collections/IterableMap.class" />
+ <include name="org/apache/commons/collections/iterators/AbstractEmptyIterator.class" />
+ <include name="org/apache/commons/collections/iterators/EmptyIterator.class" />
+ <include name="org/apache/commons/collections/iterators/EmptyMapIterator.class" />
+ <include name="org/apache/commons/collections/iterators/EmptyOrderedIterator.class" />
+ <include name="org/apache/commons/collections/iterators/EmptyOrderedMapIterator.class" />
+ <include name="org/apache/commons/collections/KeyValue.class" />
+ <include name="org/apache/commons/collections/map/AbstractHashedMap*.class" />
+ <include name="org/apache/commons/collections/map/AbstractLinkedMap*.class" />
+ <include name="org/apache/commons/collections/map/LRUMap.class" />
+ <include name="org/apache/commons/collections/MapIterator.class" />
+ <include name="org/apache/commons/collections/OrderedMap.class" />
+ <include name="org/apache/commons/collections/OrderedMapIterator.class" />
+ <include name="org/apache/commons/collections/OrderedIterator.class" />
+ <include name="org/apache/commons/collections/ResettableIterator.class" />
+ </patternset>
+ </unzip>
+ <unzip src="${build.lib}/avalon-logkit-${jar.avalon-logkit.version}.jar" dest="${build.deps}"/>
+ <unzip src="${build.lib}/oro-${jar.oro.version}.jar" dest="${build.deps}"/>
+ <unzip src="${build.lib}/commons-lang-${jar.commons-lang.version}.jar" dest="${build.deps}"/>
+ <delete dir="${build.deps}/META-INF" quiet="true"/>
+ </target>
+
+ <target name="clean-dependency-classes">
+ <delete dir="${build.deps}" quiet="true"/>
+ <mkdir dir="${build.deps}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the source directory and creates a .jar file -->
+ <!-- including the Oro and logkit dependencies for convenience -->
+ <!-- =================================================================== -->
+ <target name="jar-dep" depends="compile-src,build-dependency-classes"
+ description="Builds the Velocity Jar file including all dependencies">
+ <property name="jarname" value="${project}-dep-${version}" />
+ <antcall target="build-jar" />
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the source directory and creates a .jar file -->
+ <!-- =================================================================== -->
+ <target name="jar" depends="compile-src,clean-dependency-classes"
+ description="Builds the Velocity Jar file">
+ <property name="jarname" value="${final.name}" />
+ <antcall target="build-jar" />
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- build the jar file. Don't call this target directly, it relies on -->
+ <!-- the jar contents and ${jarname} being setup by jar or jar-dep -->
+ <!-- =================================================================== -->
+ <target name="build-jar">
+ <jar jarfile="${build.dir}/${jarname}.jar">
+
+ <metainf dir="${velocity.dir}" includes="LICENSE.txt"/>
+ <fileset dir="${build.dest}"/>
+ <fileset dir="${build.deps}"/>
+ <manifest>
+ <attribute name="Created-By" value="Apache Ant"/>
+ <attribute name="Package" value="org.apache.velocity"/>
+ <attribute name="Build-Jdk" value="${java.version}"/>
+ <attribute name="Extension-Name" value="${project}"/>
+ <attribute name="Specification-Title" value="Velocity is a Java-based template engine" />
+ <attribute name="Specification-Vendor" value="Apache Software Foundation"/>
+ <attribute name="Implementation-Title" value="org.apache.velocity"/>
+ <attribute name="Implementation-Vendor-Id" value="org.apache"/>
+ <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
+ <attribute name="Implementation-Version" value="${version}"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- jars the source -->
+ <!-- ================================================================== -->
+ <target name="jar-src"
+ depends="prepare"
+ description="Builds the Velocity Source Jar File">
+ <jar jarfile="${build.dir}/${final.name}-src.jar">
+ <metainf dir="${velocity.dir}" includes="LICENSE.txt"/>
+ <fileset dir="${build.src}"/>
+ <manifest>
+ <attribute name="Created-By" value="Apache Ant"/>
+ <attribute name="Specification-Title" value="Velocity is a Java-based template engine" />
+ <attribute name="Specification-Vendor" value="Apache Software Foundation"/>
+ <attribute name="Implementation-Title" value="org.apache.velocity"/>
+ <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
+ <attribute name="Implementation-Vendor-Id" value="org.apache"/>
+ <attribute name="Implementation-Version" value="${version}"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the example code -->
+ <!-- =================================================================== -->
+ <target name="examples" depends="build-prepare,jar"
+ description="Compiles the Velocity Example code">
+
+ <echo>
+ **************************************************************
+ ** Building the examples :
+ ** examples/appexample1 : application example
+ ** examples/appexample2 : application example
+ ** examples/context_example : example context implementations
+ ** examples/logger_example : how to make an external logger
+ ** examples/xmlapp_example : how to access XML data in a template
+ ** examples/event_example : how to use Velocity's event handlers
+ **************************************************************
+ </echo>
+
+ <javac srcdir="${example.dir}/app_example1
+ :${example.dir}/app_example2
+ :${example.dir}/context_example
+ :${example.dir}/logger_example
+ :${example.dir}/xmlapp_example
+ :${example.dir}/event_example"
+ encoding="UTF-8"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ classpathref="velocity.run.classpath"/>
+ </target>
+
+ <target name="examples-clean" depends="examples-clean-anakia">
+ <delete quiet="true">
+ <fileset dir="${example.dir}" includes="**/*.class">
+ <include name="**/*.log"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="examples-clean-anakia">
+ <delete dir="${example.dir}/anakia/docs" quiet="true"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Creates the API documentation -->
+ <!-- =================================================================== -->
+ <target name="javadocs" depends="prepare,build-prepare"
+ description="Creates the Javadoc API documentation">
+
+ <mkdir dir="${build.javadoc}"/>
+
+ <javadoc sourcepath="${build.src}"
+ packagenames="org.apache.velocity.*"
+ destdir="${build.javadoc}"
+ author="true"
+ private="false"
+ version="true"
+ use="true"
+ windowtitle="${name} ${version} API"
+ doctitle="${name} ${version} API"
+ encoding="UTF-8"
+ docencoding="UTF-8"
+ bottom="Copyright © 2000-${build.year} Apache Software Foundation. All Rights Reserved."
+ classpathref="velocity.build.classpath">
+
+ <link href="${javadocs.ref.jsdk}"/>
+
+ </javadoc>
+ </target>
+
+ <target name="javadocs-clean">
+ <delete dir="${build.javadoc}" quiet="true"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Package -->
+ <!-- =================================================================== -->
+ <target name="build-package-tree" depends="clean">
+
+ <!--
+ Don't move these ant calls into depends! If you do so, either jar
+ or jar-dep or docs (via its depends on jar) will set the jarname
+ property and as it is immutable, you will no longer be able to
+ build both jars in one go. Using antcall executes these targets
+ as subtasks and this property setting will not propagate back
+ into the main ant build
+
+ -->
+ <antcall target="jar" />
+ <antcall target="jar-dep" />
+ <antcall target="docs" />
+ <antcall target="javadocs" />
+
+ <mkdir dir="${dist.dir}"/>
+ <mkdir dir="${dist.dir}/src/java"/>
+
+ <copy todir="${dist.dir}/src/java/">
+ <fileset dir="${build.src}" />
+ </copy>
+
+ <copy todir="${dist.dir}/src/test/">
+ <fileset dir="${build.test.src}" />
+ </copy>
+
+ <copy todir="${dist.dir}/lib">
+ <fileset dir="${build.lib}" />
+ </copy>
+
+ <copy todir="${dist.dir}/build">
+ <fileset dir="${velocity.dir}/build">
+ <include name="**"/>
+ <exclude name="velocity.log"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${dist.dir}/convert">
+ <fileset dir="${velocity.dir}/convert">
+ <include name="**"/>
+ </fileset>
+ </copy>
+
+ <!-- Copy docs, exclude API docs -->
+ <copy todir="${dist.dir}/docs">
+ <fileset dir="${build.docs}">
+ <include name="**"/>
+ <exclude name="docs/api/**"/>
+ </fileset>
+ </copy>
+
+ <!-- Add freshly built Java docs -->
+ <copy todir="${dist.dir}/docs/docs/api">
+ <fileset dir="${build.javadoc}">
+ <include name="**"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${dist.dir}/examples">
+ <fileset dir="${example.dir}">
+ <include name="**"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${dist.dir}/src">
+ <fileset dir="${velocity.dir}/src">
+ <include name="**"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${dist.dir}/test">
+ <fileset dir="${velocity.dir}/test">
+ <include name="**"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${dist.dir}/xdocs">
+ <fileset dir="${xdocs.dir}">
+ <include name="**"/>
+ </fileset>
+ </copy>
+
+ <copy
+ file="${velocity.dir}/LICENSE.txt"
+ tofile="${dist.dir}/LICENSE.txt"
+ />
+
+ <copy
+ file="${velocity.dir}/README.txt"
+ tofile="${dist.dir}/README.txt"
+ />
+
+ <copy
+ file="${build.dir}/${final.name}.jar"
+ tofile="${dist.dir}/${final.name}.jar"
+ />
+
+ <copy
+ file="${build.dir}/${project}-dep-${version}.jar"
+ tofile="${dist.dir}/${project}-dep-${version}.jar"
+ />
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Packages the distribution with ZIP -->
+ <!-- ================================================================== -->
+ <target name="package-zip"
+ depends="build-package-tree">
+
+ <!-- .zip built for Windows -->
+ <fixcrlf srcdir="${dist.dir}" eol="crlf" eof="asis" encoding="ISO-8859-1">
+ <include name="**/*.html" />
+ <include name="**/*.java" />
+ <include name="**/*.properties" />
+ <include name="**/*.txt" />
+ <include name="**/*.wm" />
+ <include name="**/*.xml" />
+ </fixcrlf>
+
+ <delete file="${build.dir}/${final.name}.zip" quiet="true"/>
+ <zip zipfile="${build.dir}/${final.name}.zip" basedir="${dist.root}"
+ includes="**/${final.name}/**"/>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Packages the distribution with TAR-GZIP -->
+ <!-- ================================================================== -->
+ <target name="package-tgz"
+ depends="build-package-tree">
+
+ <!-- .tar.gz built for Unix -->
+ <fixcrlf srcdir="${dist.dir}" eol="lf" eof="remove" encoding="ISO-8859-1">
+ <include name="**/*.html" />
+ <include name="**/*.java" />
+ <include name="**/*.properties" />
+ <include name="**/*.txt" />
+ <include name="**/*.wm" />
+ <include name="**/*.xml" />
+ </fixcrlf>
+
+ <delete file="${build.dir}/${final.name}.tar.gz" quiet="true"/>
+ <tar tarfile="${build.dir}/${final.name}.tar.gz" basedir="${dist.root}"
+ includes="**/${final.name}/**" longfile="gnu" compression="gzip" />
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Packages the distribution with ZIP and TAG-GZIP -->
+ <!-- ================================================================== -->
+ <target name="package"
+ depends="package-zip,package-tgz"
+ description="Generates the Velocity distribution files">
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Cleans up the build directory -->
+ <!-- =================================================================== -->
+ <target name="clean" depends="examples-clean"
+ description="Cleans all generated files">
+ <delete dir="${build.dir}" quiet="true"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Make HTML version of Velocity documentation -->
+ <!-- =================================================================== -->
+
+ <target name="docs" depends="build-prepare,jar"
+ description="Generates the Velocity HTML documentation">
+
+ <taskdef name="anakia"
+ classname="org.apache.velocity.anakia.AnakiaTask"
+ classpathref="velocity.run.classpath"/>
+
+ <echo>
+ #######################################################
+ #
+ # Now using Anakia to transform the XML documentation
+ # to HTML.
+ #
+ # using project file: ${docs.project}
+ #
+ # Note: set property "docs.project" to "project.xml"
+ # for distribution and "project-website.xml" for
+ # website.
+ #######################################################
+ </echo>
+
+ <anakia basedir="${xdocs.dir}" destdir="${build.docs}"
+ extension=".html" style="site.vsl"
+ projectFile="stylesheets/${docs.project}"
+ excludes="**/stylesheets/** empty.xml"
+ includes="**/*.xml"
+ lastModifiedCheck="true"
+ templatePath="${xdocs.dir}/stylesheets">
+ </anakia>
+
+ <copy todir="${build.docs}/images" filtering="no">
+ <fileset dir="${xdocs.dir}/images">
+ <include name="**/*.gif"/>
+ <include name="**/*.jpeg"/>
+ <include name="**/*.jpg"/>
+ <include name="**/*.png"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${build.docs}" filtering="no">
+ <fileset dir="${xdocs.dir}">
+ <include name="**/*.css"/>
+ <include name="**/.htaccess"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+
+ <!-- =================================================================== -->
+ <!-- Cleans up the docs directory -->
+ <!-- =================================================================== -->
+ <target name="docs-clean">
+ <delete dir="${build.docs}" quiet="true"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- JUnit Tests for Velocity -->
+ <!-- =================================================================== -->
+ <target name="test" depends="build-prepare,compile-test"
+ description="Run the Velocity testcases">
+
+ <mkdir dir="${build.test.reports}"/>
+ <junit dir="${velocity.dir}"
+ fork="true"
+ printSummary="yes"
+ haltonerror="${test.haltonerror}"
+ haltonfailure="${test.haltonfailure}">
+
+ <!-- Don't use the run classpath, test using the exploded class tree -->
+ <classpath>
+ <path refid="velocity.build.classpath" />
+ <pathelement path="${build.dest}"/>
+ <pathelement path="${build.test.dest}"/>
+ </classpath>
+
+ <batchtest todir="${build.test.reports}">
+ <fileset dir="${test.java.dir}">
+ <include name="**/*TestCase.java"></include>
+
+ <exclude name="**/BaseTestCase.java"></exclude>
+
+ <exclude name="**/TexenTestCase.java"></exclude>
+ <exclude name="**/TexenClasspathTestCase.java"></exclude>
+ <exclude name="**/AnakiaTestCase.java"></exclude>
+ <exclude name="**/MultiLoaderTestCase.java"></exclude>
+ <exclude name="**/ClasspathResourceTestCase.java"></exclude>
+ </fileset>
+ </batchtest>
+ <formatter type="plain"/>
+ </junit>
+
+ <!-- Run the legacy tests for anakia, texen... -->
+ <ant antfile="${velocity.build.dir}/testcases.xml"
+ target="test-all"/>
+ </target>
+
+ <target name="test-clean">
+ <delete dir="${build.test.dest}" quiet="true"/>
+ <delete dir="${build.test}" quiet="true"/>
+ <delete dir="${build.test.reports}" quiet="true"/>
+
+ <ant antfile="${velocity.build.dir}/testcases.xml"
+ target="test-clean"/>
+ </target>
+</project>
Propchange: jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/build.xml
------------------------------------------------------------------------------
svn:keywords = Id Author Date Revision
Added: jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/ivy.xml
URL: http://svn.apache.org/viewcvs/jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/ivy.xml?rev=383388&view=auto
==============================================================================
--- jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/ivy.xml (added)
+++ jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/ivy.xml Sun Mar 5 11:59:47 2006
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ivy-module version="1.3"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://www.jayasoft.org/misc/ivy/ivy.xsd">
+ <info organisation="The Apache Software Foundation" module="jakarta-velocity" />
+ <dependencies>
+ <dependency name="antlr" rev="2.7.5" />
+ <dependency name="avalon-logkit" rev="2.1" />
+ <dependency name="commons-collections" rev="3.1" />
+ <dependency name="commons-lang" rev="2.1" />
+ <dependency name="jdom" rev="1.0" />
+ <dependency name="junit" rev="3.8.1" />
+ <dependency name="log4j" rev="1.2.12" />
+ <dependency name="oro" rev="2.0.8" />
+ <dependency name="servletapi" rev="2.3" />
+ <dependency name="werken-xpath" rev="0.9.4" />
+ </dependencies>
+</ivy-module>
Propchange: jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/ivy.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/ivy.xml
------------------------------------------------------------------------------
svn:keywords = Id Author Date Revision
Added: jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/lib/LICENSE.ivy
URL: http://svn.apache.org/viewcvs/jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/lib/LICENSE.ivy?rev=383388&view=auto
==============================================================================
--- jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/lib/LICENSE.ivy (added)
+++ jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/lib/LICENSE.ivy Sun Mar 5 11:59:47 2006
@@ -0,0 +1,26 @@
+BSD License for Ivy
+Copyright (c) 2005-2006, JAYASOFT
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ * 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.
+ * Neither the name of JAYASOFT nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS 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 COPYRIGHT OWNER OR 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.
Added: jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/lib/ivy-1.3-RC2.jar
URL: http://svn.apache.org/viewcvs/jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/lib/ivy-1.3-RC2.jar?rev=383388&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jakarta/velocity/engine/trunk/whiteboard/henning/using_ivy/lib/ivy-1.3-RC2.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org