| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 |
<project name="asdoclet" default="jar" xmlns:contrib="antlib:net.sf.antcontrib"> |
|---|
| 3 |
<property name="compiler.debug" value="on"/> |
|---|
| 4 |
<property name="compiler.generate.no.warnings" value="off"/> |
|---|
| 5 |
<property name="compiler.args" value="-encoding UTF-8 -Xlint:all -Xlint:-path"/> |
|---|
| 6 |
<property name="compiler.max.memory" value="128m"/> |
|---|
| 7 |
|
|---|
| 8 |
<property name="output.dir" value="${basedir}/out"/> |
|---|
| 9 |
<property name="test.dir" value="${basedir}/test"/> |
|---|
| 10 |
<property name="results.dir" value="${test.dir}/results"/> |
|---|
| 11 |
|
|---|
| 12 |
<property name="build.version" value="1.3.3"/> |
|---|
| 13 |
|
|---|
| 14 |
<target name="build"> |
|---|
| 15 |
<path id="compile.classpath"> |
|---|
| 16 |
<fileset dir="${basedir}"> |
|---|
| 17 |
<include name="lib/*.jar"/> |
|---|
| 18 |
</fileset> |
|---|
| 19 |
</path> |
|---|
| 20 |
|
|---|
| 21 |
<mkdir dir="${output.dir}"/> |
|---|
| 22 |
|
|---|
| 23 |
<javac srcdir="${basedir}/src" destdir="${output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true"> |
|---|
| 24 |
<compilerarg line="${compiler.args}"/> |
|---|
| 25 |
<classpath refid="compile.classpath"/> |
|---|
| 26 |
</javac> |
|---|
| 27 |
|
|---|
| 28 |
<javac srcdir="${test.dir}" destdir="${output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true"> |
|---|
| 29 |
<compilerarg line="${compiler.args}"/> |
|---|
| 30 |
<classpath refid="compile.classpath"/> |
|---|
| 31 |
</javac> |
|---|
| 32 |
</target> |
|---|
| 33 |
|
|---|
| 34 |
<target name="clean"> |
|---|
| 35 |
<delete dir="${output.dir}"/> |
|---|
| 36 |
<delete dir="${results.dir}"/> |
|---|
| 37 |
</target> |
|---|
| 38 |
|
|---|
| 39 |
<target name="jar" depends="clean, build, test"> |
|---|
| 40 |
<jar destfile="${basedir}/asdoclet.jar"> |
|---|
| 41 |
<manifest> |
|---|
| 42 |
<attribute name="Built-By" value="${user.name}"/> |
|---|
| 43 |
<attribute name="Specification-Title" value="asdoclet"/> |
|---|
| 44 |
<attribute name="Specification-Version" value="${build.version}"/> |
|---|
| 45 |
<attribute name="Specification-Vendor" value="fluffnstuff.org"/> |
|---|
| 46 |
<attribute name="Implementation-Title" value="asdoclet"/> |
|---|
| 47 |
<attribute name="Implementation-Version" value="${build.version}"/> |
|---|
| 48 |
<attribute name="Implementation-Vendor" value="fluffnstuff.org"/> |
|---|
| 49 |
</manifest> |
|---|
| 50 |
<fileset dir="${output.dir}"> |
|---|
| 51 |
<include name="org/fluffnstuff/**"/> |
|---|
| 52 |
</fileset> |
|---|
| 53 |
<fileset dir="${basedir}"> |
|---|
| 54 |
<include name="templates/**"/> |
|---|
| 55 |
</fileset> |
|---|
| 56 |
</jar> |
|---|
| 57 |
</target> |
|---|
| 58 |
|
|---|
| 59 |
<target name="test"> |
|---|
| 60 |
<path id="test.classpath"> |
|---|
| 61 |
<fileset dir="${basedir}/lib"> |
|---|
| 62 |
<include name="*.jar"/> |
|---|
| 63 |
</fileset> |
|---|
| 64 |
<dirset dir="${output.dir}"/> |
|---|
| 65 |
</path> |
|---|
| 66 |
|
|---|
| 67 |
<javadoc packagenames="" classpathref="test.classpath" sourcepath="${test.dir}" destdir="${results.dir}/cs/asdoclet" failonerror="true"> |
|---|
| 68 |
<doclet name="org.fluffnstuff.asdoclet.AsDoclet" pathref="test.classpath"> |
|---|
| 69 |
<param name="-generator" value="cs"/> |
|---|
| 70 |
<param name="-namespace" value="asdoclet"/> |
|---|
| 71 |
</doclet> |
|---|
| 72 |
</javadoc> |
|---|
| 73 |
<javadoc packagenames="" classpathref="test.classpath" sourcepath="${test.dir}" destdir="${results.dir}/actionscript" failonerror="true"> |
|---|
| 74 |
<doclet name="org.fluffnstuff.asdoclet.AsDoclet" pathref="test.classpath"> |
|---|
| 75 |
<param name="-generator" value="actionscript"/> |
|---|
| 76 |
|
|---|
| 77 |
<param name="-map" value="java.lang.Exception:null"/> |
|---|
| 78 |
</doclet> |
|---|
| 79 |
</javadoc> |
|---|
| 80 |
|
|---|
| 81 |
<pathconvert property="foo"> |
|---|
| 82 |
<fileset dir="${results.dir}"> |
|---|
| 83 |
<different targetdir="${test.dir}/expectations"/> |
|---|
| 84 |
</fileset> |
|---|
| 85 |
<mapper> |
|---|
| 86 |
<flattenmapper/> |
|---|
| 87 |
</mapper> |
|---|
| 88 |
</pathconvert> |
|---|
| 89 |
|
|---|
| 90 |
<taskdef resource="net/sf/antcontrib/antlib.xml" uri="antlib:net.sf.antcontrib" classpathref="test.classpath"/> |
|---|
| 91 |
<contrib:if> |
|---|
| 92 |
<contrib:not> |
|---|
| 93 |
<contrib:equals arg1="${foo}" arg2=""/> |
|---|
| 94 |
</contrib:not> |
|---|
| 95 |
<contrib:then> |
|---|
| 96 |
<fail message="${foo}"/> |
|---|
| 97 |
</contrib:then> |
|---|
| 98 |
</contrib:if> |
|---|
| 99 |
</target> |
|---|
| 100 |
</project> |
|---|