Trail:

root/tags/1.3.8/build.xml

Revision 86, 3.8 kB (checked in by harald, 2 years ago)
  • add default logback config
  • add #region output to c# templates to suppress code validation
  • fix a proxy generation bug where nested generic types were not resolved
Line 
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
33                 <copy todir="${output.dir}">
34                         <fileset dir="${basedir}/src">
35                                 <include name="**/*.xml"/>
36                         </fileset>
37                         <fileset dir="${basedir}">
38                                 <include name="templates/**"/>
39                         </fileset>
40                 </copy>
41
42         </target>
43
44         <target name="clean">
45                 <delete dir="${output.dir}"/>
46                 <delete dir="${results.dir}"/>
47         </target>
48
49         <target name="jar" depends="clean, build, test">
50                 <jar destfile="${basedir}/asdoclet.jar">
51                         <manifest>
52                                 <attribute name="Built-By" value="${user.name}"/>
53                                 <attribute name="Specification-Title" value="asdoclet"/>
54                                 <attribute name="Specification-Version" value="${build.version}"/>
55                                 <attribute name="Specification-Vendor" value="fluffnstuff.org"/>
56                                 <attribute name="Implementation-Title" value="asdoclet"/>
57                                 <attribute name="Implementation-Version" value="${build.version}"/>
58                                 <attribute name="Implementation-Vendor" value="fluffnstuff.org"/>
59                         </manifest>
60                         <fileset dir="${output.dir}">
61                                 <exclude name="**/logback-test.xml"/>
62
63                                 <include name="org/fluffnstuff/**"/>
64                                 <include name="templates/**"/>
65                         </fileset>
66                 </jar>
67         </target>
68
69         <target name="test">
70                 <path id="test.classpath">
71                         <fileset dir="${basedir}/lib">
72                                 <include name="*.jar"/>
73                         </fileset>
74                         <dirset dir="${output.dir}"/>
75                 </path>
76
77                 <javadoc packagenames="" classpathref="test.classpath" sourcepath="${test.dir}" destdir="${results.dir}/cs/asdoclet" failonerror="true">
78                         <doclet name="org.fluffnstuff.asdoclet.AsDoclet" pathref="test.classpath">
79                                 <param name="-generator" value="cs"/>
80                                 <param name="-namespace" value="asdoclet"/>
81                         </doclet>
82                 </javadoc>
83                 <javadoc packagenames="" classpathref="test.classpath" sourcepath="${test.dir}" destdir="${results.dir}/actionscript" failonerror="true">
84                         <doclet name="org.fluffnstuff.asdoclet.AsDoclet" pathref="test.classpath">
85                                 <param name="-generator" value="actionscript"/>
86
87                                 <param name="-map" value="java.lang.Exception:null"/>
88                         </doclet>
89                 </javadoc>
90
91                 <pathconvert property="foo">
92                         <fileset dir="${results.dir}">
93                                 <different targetdir="${test.dir}/expectations"/>
94                         </fileset>
95                         <mapper>
96                                 <flattenmapper/>
97                         </mapper>
98                 </pathconvert>
99
100                 <taskdef resource="net/sf/antcontrib/antlib.xml" uri="antlib:net.sf.antcontrib" classpathref="test.classpath"/>
101                 <contrib:if>
102                         <contrib:not>
103                                 <contrib:equals arg1="${foo}" arg2=""/>
104                         </contrib:not>
105                         <contrib:then>
106                                 <fail message="${foo}"/>
107                         </contrib:then>
108                 </contrib:if>
109         </target>
110 </project>
Note: See TracBrowser for help on using the browser.