1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!-- ======================================================================
\r
3 Sep 10, 2007 9:33:22 AM
\r
6 build task definition for xerial-core project
\r
9 ====================================================================== -->
\r
10 <project name="xerial-core project" default="default">
\r
12 build task definition for xerial-core project
\r
15 <property name="src" value="src/main/java"/>
\r
16 <property name="test" value="src/test/java"/>
\r
17 <property name="build" value="target/classes"/>
\r
19 <!-- set classpath -->
\r
20 <path id="project.classpath">
\r
21 <pathelement path="${java.classpath}/" />
\r
22 <pathelement path="${src}"/>
\r
23 <pathelement path="${test}"/>
\r
24 <pathelement path="${build}"/>
\r
25 <pathelement path="${maven.classpath}"/>
\r
28 <!-- =================================
\r
30 ================================= -->
\r
31 <target name="default" depends="depends" description="--> build task definition for xerial-wiki project">
\r
32 <antcall target="generate-parser"/>
\r
35 <!-- - - - - - - - - - - - - - - - - -
\r
37 - - - - - - - - - - - - - - - - - -->
\r
38 <target name="depends">
\r
39 <fail unless="maven.classpath">This build file cannot be used outside of the maven environment. Use mvn compile instead</fail>
\r
43 <target name="generate-parser">
\r
44 <antcall target="antlr">
\r
45 <param name="antlr.input.dir" value="${src}/org/xerial/amoeba/query"/>
\r
46 <param name="antlr.input.src" value="AmoebaQuery.g"/>
\r
48 <antcall target="antlr">
\r
49 <param name="antlr.input.dir" value="${src}/org/xerial/amoeba/query"/>
\r
50 <param name="antlr.input.src" value="AmoebaQueryTreeParser.g"/>
\r
52 <antcall target="antlr">
\r
53 <param name="antlr.input.dir" value="${src}/org/xerial/json"/>
\r
54 <param name="antlr.input.src" value="JSON.g"/>
\r
56 <antcall target="antlr">
\r
57 <param name="antlr.input.dir" value="${src}/org/xerial/json"/>
\r
58 <param name="antlr.input.src" value="JSONWalker.g"/>
\r
60 <antcall target="antlr">
\r
61 <param name="antlr.input.dir" value="${src}/org/xerial/util/xml/dtd"/>
\r
62 <param name="antlr.input.src" value="DTD.g"/>
\r
66 <target name="checkUpToDate">
\r
67 <fail unless="antlr.input.dir">no input directory</fail>
\r
68 <fail unless="antlr.input.src">no input grammar file</fail>
\r
69 <uptodate property="antlr.build.notRequired" srcfile="${antlr.input.dir}/${antlr.input.src}">
\r
70 <mapper type="glob" from="*.g" to="*.tokens"/>
\r
74 <target name="antlr" depends="checkUpToDate" unless="antlr.build.notRequired">
\r
75 <echo>input: ${antlr.input.src}</echo>
\r
76 <java classpathref="project.classpath" classname="org.antlr.Tool" fork="true" dir="${antlr.input.dir}">
\r
77 <jvmarg value="-Xmx300M"/>
\r
78 <arg value="-message-format"/>
\r
79 <arg value="antlr"/>
\r
80 <arg value="${antlr.input.src}"/>
\r