root / trunk / docscripts / build.xml

Revision 3575, 2.2 kB (checked in by pottedmeat, 3 years ago)

Added allowedChild() and build file

  • Property svn:eol-style set to native
Line 
1<project name="DocTools" default="build.all" basedir=".">
2        <description>
3        Project to document dojo library.
4    </description>
5       
6        <!-- Properties and global definitions -->
7       
8        <property environment="env" />
9
10        <property name="lib.dir" location="lib/" />
11        <property name="src.dir" location="src/" />
12        <property name="dojo.dir" location="../" />
13        <property name="build.dir" location="build" />
14        <property name="doc.dir" location="doc" />
15
16        <path id="class.path">
17                <fileset dir="${lib.dir}" includes="**/*.jar" />
18                <pathelement location="${build.dir}" />
19        </path>
20       
21        <!-- Targets to be run -->
22
23        <target name="docs" description="Create Javadoc Documentation">
24                <javadoc destdir="${doc.dir}" author="true" use="true">
25                        <fileset dir="${src.dir}" defaultexcludes="yes">
26                                <include name="java/org/dojotoolkit/doc/**"/>
27                        </fileset>
28                        <fileset file="${src.dir}/test/org/dojotoolkit/doc/ParserTest.java"/>
29                </javadoc>
30        </target>
31
32        <target name="build.all" depends="clean,init,compile" />
33       
34        <target name="clean" description="Removes target directories">
35                <delete dir="${build.dir}" />
36        </target>
37       
38        <target name="init" depends="fetch-libs" description="Creates needed build directories, initialization">
39                <mkdir dir="${build.dir}" />
40        </target>
41
42        <target name="compile" description="">
43                <javac classpath="${class.path}" destdir="${build.dir}" srcdir="${src.dir}" />
44        </target>
45
46        <target name="run" depends="compile" description="Runs the doctools.">
47                <java classname="org.dojotoolkit.doc.JsToXml"
48                                classpathref="class.path" output="output.xml">
49                        <arg value="../src/animation/Animation.js"/>
50                </java>
51        </target>
52       
53        <!-- Targets for fetching external libraries -->
54       
55        <macrodef name="get-lib">
56                <attribute name="project" />
57                <attribute name="version" />
58                <attribute name="dir" default="lib/" />
59                <attribute name="file" default="@{project}" />
60                <sequential>
61                        <get dest="@{dir}/@{file}-@{version}.jar" src="http://www.ibiblio.org/maven/@{project}/jars/@{file}-@{version}.jar" usetimestamp="yes" verbose="yes" />
62                </sequential>
63        </macrodef>
64       
65        <target name="fetch-libs" description="Download dependencies">
66                <mkdir dir="${lib.dir}" />
67                <get-lib project="xerces" file="xercesImpl" version="2.7.1" />
68                <get-lib project="xalan" version="2.7.0" />
69        </target>
70</project>
Note: See TracBrowser for help on using the browser.