4b443fe148
Google's CTemplate) and got all hot and bothered, because it seemed like it
would be sufficiently powerful to replace Velocity for our Narya templating
needs.
I then sought out a Java implementation and found one, and quickly discovered
that it lacked the right level of awesome for my needs. So I foolishly decided
to write my own, because Mustache seemed simple enough that I could reimplement
it in a few hours.
A few hours later, I had a neat and tidy reimplementation of Mustache and then
set about to converting Narya to using it. Then the fun began.
I discovered that Mustache wants everything in a hash, but sometimes you just
want to iterate over the elements of a list, and print them into the template
whole-hog. So I extended Mustache with the special "this" variable for printing
the whole context instead of pulling values out of it by name.
Then I remembered that Velocity allows you to do a deep dive into objects,
calling methods and calling methods on the return values of those methods.
Velocity even allows you to pass constants as arguments to those methods (true,
strings, integers). Well, I reimplemented the compound keys, so that you can
call foo.bar.baz, but I didn't go so far as to support constant arguments. That
seemed a step too far into complexity land and to be the sort of thing that
Mustache tries to avoid. So with compound keys, I just had to add a few
alternative versions of methods we were already calling, since we only ever
passed true/false as an argument.
Then I realized that Mustache doesn't do any smart trimming of newlines, so if
you have:
{{#stuff}}
blah blah
{{/stuff}}
You get the annoying newline after the open-tag and after the close-tag. So I
modified my implementation to trim newlines in those circumstances, so that
template authors don't have to do a bunch of template-weirding whitespace
jockeying.
Then I discovered that Mustache doesn't support any notion of scope. So when
you're inside a so-called section, the only variables visible are those bound
by that section. The stuff outside the section is totally invisible. Well,
that's not how Velocity works, you can reference things outside your loop
iterations. It seemed no terribly affront to Mustache to make things work that
way as well, so I did that.
Then I discovered a problem with the fact that Mustache implicitly binds the
loop object to the root of the namespace, so if you have {{name}} outside the
loop and then your loop object also contains a {{name}} field, then you can't
see the outside {{name}} anymore because it's shadowed. Tough titties, in this
case, I just changed our code to not shadow the name.
Then I encountered a bunch of uses of $vidx to put a space before all but the
first element of a list. So I added two more special variables -first and -last
which allow you to do just that sort of thing (and more) in a more template
friendly way because you don't need a Turing complete language just to decide
whether or not you need to mind the gap.
Then I encoutered some uses of $vidx directly, where we were using it to assign
constants in invocation service related classes. So I added another special
variable -index which resolves to basically the same thing that $vidx resolves
to (a 1-based counter indicating which element you're on in your list
iteration). I rationalized to myself that if you wanted to automatically number
laundry lists in your templates, having -index would be nice.
Finally, I have Narya's templating stuff producing character-for-character
replicas of what it used to do with Velocity. Well, actually there's one
newline in a place where there didn't used to be one, but I think that newline
makes sense and it was maybe some sort of Velocity bug that caused it not to
exist.
I've tested the gendobj, genservice and genreceiver tasks. I have no tested
whatever uses streamable_as.tmpl, but I'm pretty confident that it will work
exactly as before because I modified hundreds of lines of other templates in
exactly the same ways and they all work just fine.
So the world gets yet another templating library:
http://code.google.com/p/jmustache/
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6218 542714f4-19e9-0310-aa3c-eee0fc999fb1
427 lines
18 KiB
XML
427 lines
18 KiB
XML
<?xml version="1.0" standalone="yes"?>
|
|
<!-- build configuration -->
|
|
<project name="narya" default="compile" basedir=".">
|
|
|
|
<!-- import overriding properties -->
|
|
<property file="build.properties"/>
|
|
|
|
<!-- configuration parameters -->
|
|
<property name="lib.name" value="narya"/>
|
|
<property name="deploy.dir" value="dist"/>
|
|
<property name="savedoc.dir" value="docs"/>
|
|
<property name="javadoc.home" value="${deploy.dir}/docs"/>
|
|
<property name="classes.dir" value="${deploy.dir}/classes"/>
|
|
<property name="libs.dir" value="lib"/>
|
|
<property name="gwtjar.dir" value="${deploy.dir}/gwt-jar"/>
|
|
|
|
<import file="etc/libs-incl.xml"/>
|
|
|
|
<!-- declare our classpath business -->
|
|
<path id="classpath">
|
|
<pathelement location="${classes.dir}"/>
|
|
<fileset dir="${deploy.dir}/lib" includes="**/*.jar"/>
|
|
</path>
|
|
|
|
<!-- checks the availability of certain libraries -->
|
|
<target name="check-available" depends="prepare">
|
|
<available property="ehcache.present" classpathref="classpath"
|
|
classname="net.sf.ehcache.CacheManager"/>
|
|
<echo level="info" message="Have EHCache: ${ehcache.present}"/>
|
|
<condition property="gwt.present"><and>
|
|
<available classname="com.google.gwt.core.client.GWT" classpathref="classpath"/>
|
|
<available classname="com.threerings.gwt.ui.Widgets" classpathref="classpath"/>
|
|
</and></condition>
|
|
<echo level="info" message="Have GWT: ${gwt.present}"/>
|
|
</target>
|
|
|
|
<!-- prepares the application directories -->
|
|
<target name="prepare">
|
|
<mkdir dir="${deploy.dir}"/>
|
|
<mkdir dir="${deploy.dir}/lib"/>
|
|
<mkdir dir="${classes.dir}"/>
|
|
<mkdir dir="${javadoc.home}"/>
|
|
<copy todir="${classes.dir}">
|
|
<fileset dir="src/java" includes="**/*.properties"/>
|
|
<fileset dir="src/java" includes="**/*.tmpl"/>
|
|
</copy>
|
|
<copy todir="${deploy.dir}/lib" flatten="true">
|
|
<fileset refid="${lib.name}.libs"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<!-- makes sure our tools are compiled and defines the ant tasks -->
|
|
<target name="preptools" depends="prepare">
|
|
<javac srcdir="src/java" destdir="${classes.dir}" includeAntRuntime="false"
|
|
debug="on" optimize="${build.optimize}" deprecation="on" source="1.5" target="1.5">
|
|
<classpath refid="classpath"/>
|
|
<compilerarg value="-Xlint"/>
|
|
<compilerarg value="-Xlint:-serial"/>
|
|
<include name="com/threerings/presents/tools/**"/>
|
|
</javac>
|
|
<taskdef resource="com/threerings/presents/tools.properties" classpathref="classpath"/>
|
|
</target>
|
|
|
|
<!-- cleans out the intermediate build files -->
|
|
<target name="clean" depends="common-clean">
|
|
<delete dir="${deploy.dir}/classes"/>
|
|
<delete dir="${deploy.dir}/docs"/>
|
|
<delete dir="${gwtjar.dir}"/>
|
|
<delete failonerror="false"><fileset dir="${deploy.dir}" includes="*.jar"/></delete>
|
|
<delete failonerror="false"><fileset dir="${deploy.dir}" includes="*.swc"/></delete>
|
|
</target>
|
|
|
|
<!-- wipes the entire build directory clean -->
|
|
<target name="distclean" depends="common-clean">
|
|
<delete dir="${deploy.dir}"/>
|
|
</target>
|
|
|
|
<!-- common clean tasks -->
|
|
<target name="common-clean">
|
|
<ant dir="tests" target="clean"/>
|
|
</target>
|
|
|
|
<!-- build the java class files -->
|
|
<target name="compile" depends="prepare,check-available">
|
|
<javac srcdir="src/java" destdir="${classes.dir}" includeAntRuntime="false"
|
|
debug="on" optimize="${build.optimize}" deprecation="on" source="1.5" target="1.5">
|
|
<classpath refid="classpath"/>
|
|
<compilerarg value="-Xlint"/>
|
|
<compilerarg value="-Xlint:-serial"/>
|
|
<exclude name="com/threerings/presents/peer/server/EHCache*" unless="ehcache.present"/>
|
|
<exclude name="**/web/**/*.java" unless="gwt.present"/>
|
|
</javac>
|
|
</target>
|
|
|
|
<!-- checks whether our Flash library needs building -->
|
|
<target name="checkaslib">
|
|
<condition property="no_build_aslib"><or>
|
|
<not><available file="${flexsdk.dir}/lib/compc.jar"/></not>
|
|
<and>
|
|
<uptodate targetfile="${deploy.dir}/${lib.name}lib.swc">
|
|
<srcfiles dir="src/as" includes="**/*.as"/>
|
|
</uptodate>
|
|
</and>
|
|
</or></condition>
|
|
</target>
|
|
|
|
<!-- builds our Flash library -->
|
|
<target name="aslib" unless="no_build_aslib" depends="checkaslib">
|
|
<!-- Generate aslib-config.xml for Flash Player and general compilation -->
|
|
<copy file="etc/aslib-config.xml.in" tofile="${deploy.dir}/aslib-config.xml">
|
|
<filterset>
|
|
<filter token="flex_sdk_dir" value="${flexsdk.dir}"/>
|
|
<filter token="lib_name" value="${lib.name}"/>
|
|
</filterset>
|
|
</copy>
|
|
<!-- Build Narya -->
|
|
<java jar="${flexsdk.dir}/lib/compc.jar" fork="true" failonerror="true">
|
|
<arg value="-load-config"/>
|
|
<arg value="${deploy.dir}/aslib-config.xml"/>
|
|
<arg value="-compiler.optimize"/>
|
|
<arg value="-compiler.source-path=src/as/"/>
|
|
<arg value="-include-sources=src/as/"/>
|
|
<arg value="-output"/>
|
|
<arg value="${deploy.dir}/${lib.name}lib.swc"/>
|
|
</java>
|
|
<delete file="${deploy.dir}/aslib-config.xml"/>
|
|
</target>
|
|
|
|
<!-- build the native libraries -->
|
|
<condition property="isunix"><os family="unix"/></condition>
|
|
<target name="ninstall" depends="prepare" if="isunix">
|
|
<echo level="info" message="Doing native compilation on ${os.name}..."/>
|
|
<exec dir="src/java/com/threerings/util/signal/${os.name}" executable="make">
|
|
<arg line="install"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<!-- build the javadoc documentation -->
|
|
<target name="javadoc" depends="prepare">
|
|
<javadoc sourcepath="src/java" packagenames="com.threerings.*"
|
|
destdir="${javadoc.home}" stylesheetfile="docs/stylesheet.css"
|
|
additionalparam="-breakiterator"
|
|
link="http://www.threerings.net/code/narya/docs/api">
|
|
<classpath refid="classpath"/>
|
|
<link href="http://java.sun.com/j2se/1.5/docs/api/"/>
|
|
<!-- ant documentation is not available online, sorry kids -->
|
|
<link href="file:///usr/share/doc/ant-doc/javadocs"/>
|
|
<link href="http://samskivert.com/code/samskivert/samskivert/docs/api"/>
|
|
</javadoc>
|
|
</target>
|
|
|
|
<!-- builds the javadocs and stuffs them in a directory where they -->
|
|
<!-- won't be blown away when we do "clean" next time -->
|
|
<target name="savedoc" depends="javadoc">
|
|
<delete dir="${savedoc.dir}/api"/>
|
|
<copy todir="${savedoc.dir}/api">
|
|
<fileset dir="${javadoc.home}" includes="**/*"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<!-- builds the ActionScript documention -->
|
|
<target name="asdoc" unless="no_build_aslib" depends="checkaslib">
|
|
<mkdir dir="${deploy.dir}/asdocs"/>
|
|
<java classpath="${flexsdk.dir}/lib/asdoc.jar" classname="flex2.tools.ASDoc" fork="true">
|
|
<jvmarg value="-Xmx1024m"/>
|
|
<jvmarg value="-Dsun.io.useCanonCashes=false"/>
|
|
<jvmarg value="-Xbootclasspath/p:${flexsdk.dir}/asdoc/lib/xalan.jar"/>
|
|
<arg value="+flexlib=${flexsdk.dir}/frameworks"/>
|
|
<arg line="-library-path ${flexsdk.dir}/frameworks/libs"/>
|
|
<arg line="-templates-path ${flexsdk.dir}/asdoc/templates"/>
|
|
<arg line="-doc-sources src/as"/>
|
|
<arg line="-doc-sources src/player"/>
|
|
<arg line="-output ${deploy.dir}/asdocs"/>
|
|
</java>
|
|
</target>
|
|
|
|
<!-- runs our tests -->
|
|
<target name="tests">
|
|
<ant dir="tests" target="tests"/>
|
|
</target>
|
|
|
|
<!-- a target for rebuilding everything -->
|
|
<target name="all" depends="clean,prepare,compile,aslib,ninstall,javadoc,dist"/>
|
|
|
|
<!-- builds our distribution files (war and jar) -->
|
|
<target name="dist" depends="prepare,compile,procstream,aslib,ninstall">
|
|
<!-- build our tests since that isn't otherwise normally done -->
|
|
<ant dir="tests" target="compile"/>
|
|
<!-- build our various jar files -->
|
|
<jar destfile="${deploy.dir}/${lib.name}-base.jar">
|
|
<fileset dir="${classes.dir}">
|
|
<include name="com/threerings/NaryaLog**"/>
|
|
<include name="com/threerings/io/**"/>
|
|
<include name="com/threerings/nio/**"/>
|
|
<include name="com/threerings/util/**"/>
|
|
<include name="com/threerings/web/**"/>
|
|
<exclude name="com/threerings/**/tools/**"/>
|
|
<exclude name="**/*.c,**/Makefile,**/*.h"/>
|
|
</fileset>
|
|
</jar>
|
|
<jar destfile="${deploy.dir}/${lib.name}-distrib.jar">
|
|
<fileset dir="${classes.dir}">
|
|
<include name="com/threerings/presents/**"/>
|
|
<include name="com/threerings/crowd/**"/>
|
|
<include name="com/threerings/admin/**"/>
|
|
<include name="com/threerings/bureau/**"/>
|
|
<exclude name="com/threerings/**/tools/**"/>
|
|
<exclude name="com/threerings/**/tools.properties"/>
|
|
<exclude name="**/*.html,**/*.png"/>
|
|
</fileset>
|
|
</jar>
|
|
<jar destfile="${deploy.dir}/${lib.name}-tools.jar">
|
|
<fileset dir="${classes.dir}">
|
|
<include name="com/threerings/**/tools/**"/>
|
|
<include name="com/threerings/**/tools.properties"/>
|
|
</fileset>
|
|
</jar>
|
|
<jar destfile="${deploy.dir}/${lib.name}-tests.jar">
|
|
<fileset dir="tests/${classes.dir}" includes="com/threerings/**"/>
|
|
</jar>
|
|
<!-- build a dependencies-included version of narya-tools -->
|
|
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
|
|
classpathref="classpath"/>
|
|
<jarjar destfile="${deploy.dir}/${lib.name}-tools-full.jar">
|
|
<fileset dir="${classes.dir}">
|
|
<include name="com/threerings/io/**"/>
|
|
<include name="com/threerings/presents/**"/>
|
|
<include name="com/threerings/util/**"/>
|
|
</fileset>
|
|
<zipfileset src="${deploy.dir}/lib/samskivert.jar"/>
|
|
<zipfileset src="${deploy.dir}/lib/jmustache-1.0.jar"/>
|
|
<rule pattern="com.samskivert.**" result="cs.@1"/>
|
|
<zipfileset src="${deploy.dir}/lib/javassist.jar"/>
|
|
<rule pattern="javassist.**" result="ja.@1"/>
|
|
<zipfileset src="${deploy.dir}/lib/guava.jar"/>
|
|
<rule pattern="com.google.**" result="cgc.@1"/>
|
|
</jarjar>
|
|
<antcall target="dist-gwt"/>
|
|
</target>
|
|
|
|
<target name="dist-gwt" if="gwt.present">
|
|
<!-- we export a small selection of classes for use by GWT -->
|
|
<mkdir dir="${gwtjar.dir}"/>
|
|
<copy todir="${gwtjar.dir}">
|
|
<fileset dir="src/java">
|
|
<include name="**/web/server/*Exception.java"/>
|
|
<include name="**/web/client/*.java"/>
|
|
<include name="**/web/gwt/*.java"/>
|
|
<include name="**/web/*.gwt.xml"/>
|
|
</fileset>
|
|
</copy>
|
|
<jar basedir="${gwtjar.dir}" destfile="${deploy.dir}/${lib.name}-gwt.jar"/>
|
|
<delete dir="${gwtjar.dir}"/>
|
|
</target>
|
|
|
|
<!-- generates fields for persistent record classes -->
|
|
<target name="genrecord" depends="prepare">
|
|
<taskdef name="grecord" classname="com.samskivert.depot.tools.GenRecordTask"
|
|
classpathref="classpath"/>
|
|
<!-- make sure the record class files are all compiled -->
|
|
<javac srcdir="src/java" destdir="${classes.dir}" debug="on" optimize="${build.optimize}"
|
|
includeAntRuntime="false" deprecation="on" source="1.5" target="1.5">
|
|
<classpath refid="classpath"/>
|
|
<include name="**/*Record.java"/>
|
|
</javac>
|
|
<!-- now update the source files -->
|
|
<grecord classpathref="classpath">
|
|
<fileset dir="src/java" includes="**/*Record.java"/>
|
|
</grecord>
|
|
</target>
|
|
|
|
<!-- generates additional methods for distributed object classes -->
|
|
<target name="gendobj" depends="preptools">
|
|
<!-- make sure the dobject class files are all compiled -->
|
|
<javac srcdir="src/java" destdir="${classes.dir}" includeAntRuntime="false" debug="on"
|
|
optimize="${build.optimize}" deprecation="on" source="1.5" target="1.5">
|
|
<classpath refid="classpath"/>
|
|
<include name="**/*Object.java"/>
|
|
</javac>
|
|
<!-- now generate the associated files -->
|
|
<gendobj classpathref="classpath">
|
|
<fileset dir="src/java" includes="**/*Object.java"/>
|
|
</gendobj>
|
|
</target>
|
|
|
|
<!-- generates marshaller and dispatcher classes for all invocation service declarations -->
|
|
<target name="genservice" depends="preptools">
|
|
<!-- make sure the service class files are all compiled -->
|
|
<javac srcdir="src/java" destdir="${classes.dir}" includeAntRuntime="false" debug="on"
|
|
optimize="${build.optimize}" deprecation="on" source="1.5" target="1.5">
|
|
<classpath refid="classpath"/>
|
|
<include name="**/*Service.java"/>
|
|
<exclude name="**/InvocationService.java"/>
|
|
</javac>
|
|
<!-- now generate the associated files -->
|
|
<genservice header="lib/SOURCE_HEADER" asroot="src/as" classpathref="classpath">
|
|
<fileset dir="src/java" includes="**/*Service.java">
|
|
<exclude name="**/InvocationService.java"/>
|
|
<exclude name="**/peer/**"/>
|
|
<exclude name="**/admin/**"/>
|
|
</fileset>
|
|
<providerless service="ChatService"/>
|
|
<providerless service="SimulatorService"/>
|
|
<providerless service="TimeBaseService"/>
|
|
</genservice>
|
|
<genservice header="lib/SOURCE_HEADER" classpathref="classpath">
|
|
<fileset dir="src/java" includes="**/peer/**/*Service.java"/>
|
|
<fileset dir="src/java" includes="**/admin/**/*Service.java"/>
|
|
</genservice>
|
|
</target>
|
|
|
|
<!-- generates sender and decoder classes for all invocation receiver declarations -->
|
|
<target name="genreceiver" depends="preptools">
|
|
<!-- make sure the receiver class files are all compiled -->
|
|
<javac srcdir="src/java" destdir="${classes.dir}" includeAntRuntime="false"
|
|
debug="on" optimize="${build.optimize}" deprecation="on" source="1.5" target="1.5">
|
|
<classpath refid="classpath"/>
|
|
<include name="**/*Receiver.java"/>
|
|
<exclude name="**/InvocationReceiver.java"/>
|
|
</javac>
|
|
<!-- now generate the associated files -->
|
|
<genreceiver header="lib/SOURCE_HEADER" classpathref="classpath">
|
|
<fileset dir="src/java" includes="**/*Receiver.java"
|
|
excludes="**/InvocationReceiver.java"/>
|
|
</genreceiver>
|
|
</target>
|
|
|
|
<!-- adds readField and writeField methods to Stremable classes -->
|
|
<target name="procstream" depends="preptools">
|
|
<!-- now instrument the associated files -->
|
|
<instream outdir="${classes.dir}">
|
|
<path refid="classpath"/>
|
|
<fileset dir="${classes.dir}" includes="**/data/*.class"/>
|
|
<fileset dir="${classes.dir}" includes="**/net/*.class"/>
|
|
<fileset dir="${classes.dir}" includes="**/dobj/*.class"/>
|
|
<fileset dir="${classes.dir}" includes="**/util/*.class"/>
|
|
</instream>
|
|
</target>
|
|
|
|
<!-- generates ActionScript versions of our Streamable classes -->
|
|
<target name="genascript" depends="preptools">
|
|
<genascript header="lib/SOURCE_HEADER" asroot="src/as">
|
|
<fileset dir="src/java" includes="**/data/*.java"/>
|
|
</genascript>
|
|
</target>
|
|
|
|
<!-- various bits used by the retroweaver tasks -->
|
|
<property name="inpre" value="${deploy.dir}/${lib.name}"/>
|
|
<property name="outpre" value="${deploy.dir}/retro/${lib.name}"/>
|
|
|
|
<!-- a helper task for 'retro' -->
|
|
<target name="vweave">
|
|
<taskdef name="weave" classpathref="classpath"
|
|
classname="com.rc.retroweaver.ant.RetroWeaverTask"/>
|
|
<path id="retrocp">
|
|
<pathelement location="/usr/local/jdk1.4/jre/lib/rt.jar"/>
|
|
<fileset dir="lib" includes="**/*.jar"/>
|
|
<fileset dir="${deploy.dir}/retro" includes="*.jar"/>
|
|
</path>
|
|
<weave inputjar="${inpre}-${which}.jar" outputjar="${outpre}-${which}.jar"
|
|
failonerror="true">
|
|
<classpath refid="retrocp"/>
|
|
</weave>
|
|
</target>
|
|
|
|
<!-- converts our 1.5 code to a 1.4 compatible format -->
|
|
<target name="retro" depends="dist">
|
|
<taskdef name="weave" classpathref="classpath"
|
|
classname="com.rc.retroweaver.ant.RetroWeaverTask"/>
|
|
<mkdir dir="${deploy.dir}/retro"/>
|
|
|
|
<!-- we weave everything a first time without verification so that -->
|
|
<!-- interdependencies will resolve the second time -->
|
|
<weave inputjar="${inpre}-base.jar" outputjar="${outpre}-base.jar"/>
|
|
<weave inputjar="${inpre}-distrib.jar" outputjar="${outpre}-distrib.jar"/>
|
|
|
|
<!-- now weave again with the verifier to check for unweavable 1.5isms -->
|
|
<antcall target="vweave"><param name="which" value="base"/></antcall>
|
|
<antcall target="vweave"><param name="which" value="distrib"/></antcall>
|
|
</target>
|
|
|
|
<!-- generate a class hierarchy diagram -->
|
|
<target name="hierviz" depends="prepare,compile">
|
|
<taskdef name="viztool" classname="com.samskivert.viztool.DriverTask"/>
|
|
<viztool visualizer="com.samskivert.viztool.hierarchy.HierarchyVisualizer"
|
|
pkgroot="com.threerings.miso" classes="com.threerings.miso.*"
|
|
output="hierviz.ps">
|
|
<classpath refid="classpath"/>
|
|
</viztool>
|
|
</target>
|
|
|
|
<!-- generate a class hierarchy diagram -->
|
|
<target name="sumgen" depends="prepare,compile">
|
|
<taskdef name="viztool" classname="com.samskivert.viztool.DriverTask"/>
|
|
<viztool visualizer="com.samskivert.viztool.summary.SummaryVisualizer"
|
|
pkgroot="com.threerings.miso"
|
|
classes="com.threerings.miso.*Scene.*"
|
|
output="summary.ps">
|
|
<classpath refid="base.classpath"/>
|
|
</viztool>
|
|
</target>
|
|
|
|
<!-- creates a zipfile with our source distribution -->
|
|
<target name="snapshot">
|
|
<echo message="You may want to stop and run 'ant savedoc' first."/>
|
|
<delete file="${deploy.dir}/${lib.name}-snapshot.zip"/>
|
|
<mkdir dir="${deploy.dir}/snapshot/${lib.name}"/>
|
|
<copy todir="${deploy.dir}/snapshot/${lib.name}">
|
|
<fileset dir=".">
|
|
<include name="**"/>
|
|
<exclude name="dist/**"/>
|
|
<exclude name="tests/dist/**"/>
|
|
<exclude name="${lib.name}-*.zip"/>
|
|
</fileset>
|
|
</copy>
|
|
<copy todir="${deploy.dir}/snapshot/${lib.name}/lib">
|
|
<fileset dir="${deploy.dir}/lib" includes="*.jar"/>
|
|
</copy>
|
|
<copy todir="${deploy.dir}/snapshot/${lib.name}/docs/api">
|
|
<fileset dir="${deploy.dir}/docs" includes="**"/>
|
|
</copy>
|
|
<zip destfile="${deploy.dir}/${lib.name}-snapshot.zip" basedir="${deploy.dir}/snapshot"/>
|
|
<delete dir="${deploy.dir}/snapshot"/>
|
|
</target>
|
|
|
|
</project>
|