1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <project name="RegExpSupport" default="all">
4 <property file="regexp-lang.properties" />
6 <!-- Uncomment the following property if no tests compilation is needed -->
8 <property name="skip.tests" value="true"/>
11 <!-- The task requires the following libraries from IntelliJ IDEA distribution: -->
12 <!-- javac2.jar; jdom.jar; asm.jar; asm-commons.jar -->
13 <taskdef name="javac2" classname="com.intellij.ant.Javac2">
14 <classpath refid="classpath.uidesigner" />
17 <path id="classpath.uidesigner">
18 <path refid="jdk.classpath.idea_8.0" />
20 <fileset dir="${jdk.home.idea_8.0}">
21 <include name="redist/javac2.jar" />
26 <!-- Compiler options -->
28 <property name="compiler.debug" value="on" />
29 <property name="compiler.generate.no.warnings" value="off" />
30 <property name="compiler.args" value="" />
31 <property name="compiler.max.memory" value="128m" />
32 <patternset id="ignored.files">
33 <exclude name="**/CVS/**" />
34 <exclude name="**/SCCS/**" />
35 <exclude name="**/RCS/**" />
36 <exclude name="**/rcs/**" />
37 <exclude name="**/.dependency-info/**" />
38 <exclude name="**/.svn/**" />
40 <patternset id="compiler.excluded">
42 <patternset id="compiler.resources">
43 <include name="**/?*.properties" />
44 <include name="**/?*.xml" />
45 <include name="**/?*.html" />
46 <include name="**/?*.gif" />
47 <include name="**/?*.png" />
48 <include name="**/?*.jpeg" />
49 <include name="**/?*.xsd" />
50 <include name="**/?*.xsl" />
51 <include name="**/?*.xhtml" />
52 <include name="**/?*.template" />
55 <!-- JDK definitions -->
57 <path id="jdk.classpath.idea_8.0">
58 <fileset dir="${jdk.home.idea_8.0}">
59 <include name="lib/*.jar" />
61 <include name="lib/tools.jar"/>
65 <property name="project.jdk.home" value="${jdk.home.idea_8.0}" />
66 <property name="project.jdk.classpath" value="jdk.classpath.idea_8.0" />
69 <!-- Global Libraries -->
71 <!-- Application Server Libraries -->
76 <!-- Module regexp-lang -->
78 <dirname property="module.regexp-lang.basedir" file="${ant.file}" />
81 <property name="module.jdk.home.regexp-lang" value="${project.jdk.home}" />
82 <property name="module.jdk.classpath.regexp-lang" value="${project.jdk.classpath}" />
84 <property name="compiler.args.regexp-lang" value="${compiler.args}" />
86 <property name="regexp-lang.output.dir" value="${module.regexp-lang.basedir}/build/classes/production" />
87 <property name="regexp-lang.testoutput.dir" value="${module.regexp-lang.basedir}/build/classes/test" />
89 <path id="regexp-lang.module.bootclasspath">
90 <!-- Paths to be included in compilation bootclasspath -->
93 <path id="regexp-lang.module.classpath">
94 <path refid="${module.jdk.classpath.regexp-lang}" />
98 <patternset id="excluded.from.module.regexp-lang">
99 <patternset refid="ignored.files" />
102 <patternset id="excluded.from.compilation.regexp-lang">
103 <patternset refid="compiler.excluded" />
104 <patternset refid="excluded.from.module.regexp-lang" />
107 <path id="regexp-lang.module.sourcepath">
108 <dirset dir="${module.regexp-lang.basedir}">
109 <include name="src" />
113 <path id="regexp-lang.module.test.sourcepath">
114 <dirset dir="${module.regexp-lang.basedir}">
115 <include name="test" />
120 <target name="compile.module.regexp-lang"
121 depends="compile.module.regexp-lang.production,compile.module.regexp-lang.tests"
122 description="Compile module regexp-lang" />
124 <target name="compile.module.regexp-lang.production" description="Compile module regexp-lang; production classes">
125 <mkdir dir="${regexp-lang.output.dir}" />
126 <javac2 destdir="${regexp-lang.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}"
127 memorymaximumsize="${compiler.max.memory}" target="1.5">
128 <compilerarg line="${compiler.args.regexp-lang}" />
129 <bootclasspath refid="regexp-lang.module.bootclasspath" />
130 <classpath refid="regexp-lang.module.classpath" />
131 <src refid="regexp-lang.module.sourcepath" />
132 <patternset refid="excluded.from.compilation.regexp-lang" />
135 <copy todir="${regexp-lang.output.dir}">
136 <fileset dir="${module.regexp-lang.basedir}/src">
137 <patternset refid="compiler.resources" />
139 <patternset refid="excluded.from.compilation.regexp-lang" />
144 <target name="compile.module.regexp-lang.tests" depends="compile.module.regexp-lang.production"
145 description="compile module regexp-lang; test classes" unless="skip.tests">
146 <mkdir dir="${regexp-lang.testoutput.dir}" />
147 <javac2 destdir="${regexp-lang.testoutput.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}"
148 memorymaximumsize="${compiler.max.memory}" target="1.5">
149 <compilerarg line="${compiler.args.regexp-lang}" />
150 <classpath refid="regexp-lang.module.classpath" />
151 <classpath location="${regexp-lang.output.dir}" />
152 <src refid="regexp-lang.module.test.sourcepath" />
153 <patternset refid="excluded.from.compilation.regexp-lang" />
156 <copy todir="${regexp-lang.testoutput.dir}">
157 <fileset dir="${module.regexp-lang.basedir}/test">
158 <patternset refid="compiler.resources" />
160 <patternset refid="excluded.from.compilation.regexp-lang" />
165 <target name="clean.module.regexp-lang" description="cleanup module">
166 <delete dir="${regexp-lang.output.dir}" />
167 <delete dir="${regexp-lang.testoutput.dir}" />
171 <target name="init" description="Build initialization">
172 <!-- Perform any build initialization in this target -->
175 <target name="clean" depends="clean.module.regexp-lang" description="cleanup all" />
177 <target name="all" depends="init, clean, compile.module.regexp-lang" description="build all" />