1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <project name="inject-language" default="all">
5 <property file="IntelliLang.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/**"/>
39 <exclude name="**/.cvsignore/**"/>
41 <patternset id="compiler.excluded">
43 <patternset id="compiler.resources">
44 <include name="**/?*.properties"/>
45 <include name="**/?*.xml"/>
46 <include name="**/?*.gif"/>
47 <include name="**/?*.png"/>
48 <include name="**/?*.jpeg"/>
49 <include name="**/?*.jpg"/>
50 <include name="**/?*.html"/>
51 <include name="**/?*.dtd"/>
52 <include name="**/?*.tld"/>
55 <!-- JDK definitions -->
57 <path id="jdk.classpath.idea_8.0">
58 <fileset dir="${jdk.home.idea_8.0}">
59 <include name="lib/*.jar" />
60 <include name="plugins/xpath/lib/*.jar" />
64 <property name="project.jdk.home" value="${jdk.home.idea_8.0}"/>
65 <property name="project.jdk.classpath" value="jdk.classpath.idea_8.0"/>
68 <!-- Global Libraries -->
71 <!-- Application Server Libraries -->
75 <!-- Module regexp-lang-java -->
77 <dirname property="module.regexp-lang-java.basedir" file="${ant.file}"/>
80 <property name="module.jdk.home.regexp-lang-java" value="${project.jdk.home}"/>
81 <property name="module.jdk.classpath.regexp-lang-java" value="${project.jdk.classpath}"/>
83 <property name="compiler.args.regexp-lang-java" value="${compiler.args}"/>
85 <property name="regexp-lang-java.output.dir" value="${module.regexp-lang-java.basedir}/../RegExpSupport/build/classes/production"/>
86 <property name="regexp-lang-java.testoutput.dir" value="${module.regexp-lang-java.basedir}/../RegExpSupport/build/classes/test"/>
88 <path id="regexp-lang-java.module.bootclasspath">
89 <!-- Paths to be included in compilation bootclasspath -->
92 <path id="regexp-lang-java.module.classpath">
93 <path refid="${module.jdk.classpath.regexp-lang-java}"/>
97 <patternset id="excluded.from.module.regexp-lang-java">
98 <patternset refid="ignored.files"/>
101 <patternset id="excluded.from.compilation.regexp-lang-java">
102 <patternset refid="compiler.excluded"/>
103 <patternset refid="excluded.from.module.regexp-lang-java"/>
106 <path id="regexp-lang-java.module.sourcepath">
107 <dirset dir="${module.regexp-lang-java.basedir}/../RegExpSupport">
108 <include name="src"/>
112 <path id="regexp-lang-java.module.test.sourcepath">
113 <dirset dir="${module.regexp-lang-java.basedir}/../RegExpSupport">
114 <include name="test"/>
119 <target name="compile.module.regexp-lang-java" depends="compile.module.regexp-lang-java.production,compile.module.regexp-lang-java.tests" description="Compile module regexp-lang-java"/>
121 <target name="compile.module.regexp-lang-java.production" description="Compile module regexp-lang-java; production classes">
122 <mkdir dir="${regexp-lang-java.output.dir}"/>
123 <javac2 destdir="${regexp-lang-java.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" target="1.5">
124 <compilerarg line="${compiler.args.regexp-lang-java}"/>
125 <bootclasspath refid="regexp-lang-java.module.bootclasspath"/>
126 <classpath refid="regexp-lang-java.module.classpath"/>
127 <src refid="regexp-lang-java.module.sourcepath"/>
128 <patternset refid="excluded.from.compilation.regexp-lang-java"/>
131 <copy todir="${regexp-lang-java.output.dir}">
132 <fileset dir="${module.regexp-lang-java.basedir}/../RegExpSupport/src">
133 <patternset refid="compiler.resources"/>
135 <patternset refid="excluded.from.compilation.regexp-lang-java"/>
140 <target name="compile.module.regexp-lang-java.tests" depends="compile.module.regexp-lang-java.production" description="compile module regexp-lang-java; test classes" unless="skip.tests">
141 <mkdir dir="${regexp-lang-java.testoutput.dir}"/>
142 <javac2 destdir="${regexp-lang-java.testoutput.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" target="1.5">
143 <compilerarg line="${compiler.args.regexp-lang-java}"/>
144 <classpath refid="regexp-lang-java.module.classpath"/>
145 <classpath location="${regexp-lang-java.output.dir}"/>
146 <src refid="regexp-lang-java.module.test.sourcepath"/>
147 <patternset refid="excluded.from.compilation.regexp-lang-java"/>
150 <copy todir="${regexp-lang-java.testoutput.dir}">
151 <fileset dir="${module.regexp-lang-java.basedir}/../RegExpSupport/test">
152 <patternset refid="compiler.resources"/>
154 <patternset refid="excluded.from.compilation.regexp-lang-java"/>
159 <target name="clean.module.regexp-lang-java" description="cleanup module">
160 <delete dir="${regexp-lang-java.output.dir}"/>
161 <delete dir="${regexp-lang-java.testoutput.dir}"/>
165 <!-- Module IntelliLang -->
167 <dirname property="module.intellilang.basedir" file="${ant.file}"/>
170 <property name="module.jdk.home.intellilang" value="${project.jdk.home}"/>
171 <property name="module.jdk.classpath.intellilang" value="${project.jdk.classpath}"/>
173 <property name="compiler.args.intellilang" value="${compiler.args}"/>
175 <property name="intellilang.output.dir" value="${module.intellilang.basedir}/build/classes/production"/>
176 <property name="intellilang.testoutput.dir" value="${module.intellilang.basedir}/build/classes/test"/>
178 <path id="intellilang.module.bootclasspath">
179 <!-- Paths to be included in compilation bootclasspath -->
182 <path id="intellilang.module.classpath">
183 <path refid="${module.jdk.classpath.intellilang}"/>
184 <pathelement location="${regexp-lang-java.output.dir}"/>
185 <pathelement location="${regexp-lang-java.testoutput.dir}"/>
189 <patternset id="excluded.from.module.intellilang">
190 <patternset refid="ignored.files"/>
193 <patternset id="excluded.from.compilation.intellilang">
194 <patternset refid="compiler.excluded"/>
195 <patternset refid="excluded.from.module.intellilang"/>
198 <path id="intellilang.module.sourcepath">
199 <dirset dir="${module.intellilang.basedir}">
200 <include name="src"/>
205 <target name="compile.module.intellilang" depends="compile.module.intellilang.production,compile.module.intellilang.tests" description="Compile module IntelliLang"/>
207 <target name="compile.module.intellilang.production" depends="compile.module.regexp-lang-java" description="Compile module IntelliLang; production classes">
208 <mkdir dir="${intellilang.output.dir}"/>
209 <javac2 destdir="${intellilang.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" target="1.5">
210 <compilerarg line="${compiler.args.intellilang}"/>
211 <bootclasspath refid="intellilang.module.bootclasspath"/>
212 <classpath refid="intellilang.module.classpath"/>
213 <src refid="intellilang.module.sourcepath"/>
214 <patternset refid="excluded.from.compilation.intellilang"/>
217 <copy todir="${intellilang.output.dir}">
218 <fileset dir="${module.intellilang.basedir}/src">
219 <patternset refid="compiler.resources"/>
221 <patternset refid="excluded.from.compilation.intellilang"/>
226 <target name="compile.module.intellilang.tests" depends="compile.module.intellilang.production" description="compile module IntelliLang; test classes" unless="skip.tests"/>
228 <target name="clean.module.intellilang" description="cleanup module">
229 <delete dir="${intellilang.output.dir}"/>
230 <delete dir="${intellilang.testoutput.dir}"/>
233 <target name="init" description="Build initialization">
234 <!-- Perform any build initialization in this target -->
237 <target name="clean" depends="clean.module.regexp-lang-java, clean.module.intellilang" description="cleanup all"/>
239 <target name="all" depends="init, clean, compile.module.regexp-lang-java, compile.module.intellilang" description="build all"/>