if there aren't any physical accessors for groovy property, search for them anyway
[fedora-idea.git] / RegExpSupport / build.xml
blob2c4256252de9d10317bbea2f5017ca862cc30966
1 <project default="zips" name="Regular Expression Support">
3   <property file="regexp-lang.properties" />
5   <fail unless="jdk.home.idea_8.0">
6     Please set the property 'jdk.home.idea_8.0' to point to your IntelliJ IDEA 8.0 installation directory.
7   </fail>
9   <!-- override for embedded build -->
10   <property name="src.zip" value="build/src_RegExpSupport.zip" />
11   <property name="src.zip.update" value="false" />
13   <import file="regexp-lang.xml" />
15   <path id="jdk.bootclasspath.idea_6.0">
16     <path>
17       <fileset dir="${jdk.home.idea_8.0}">
18         <include name="jre/lib/charsets.jar" />
19         <include name="jre/lib/deploy.jar" />
20         <include name="jre/lib/javaws.jar" />
21         <include name="jre/lib/jce.jar" />
22         <include name="jre/lib/jsse.jar" />
23         <include name="jre/lib/plugin.jar" />
24         <include name="jre/lib/rt.jar" />
25         <include name="jre/lib/resources.jar" />
26         <include name="jre/lib/tools.jar" />
27         <include name="jre/lib/ext/dnsns.jar" />
28         <include name="jre/lib/ext/localedata.jar" />
29         <include name="jre/lib/ext/sunjce_provider.jar" />
30         <include name="jre/lib/ext/sunpkcs11.jar" />
31       </fileset>
32     </path>
33     <pathelement location="${jdk.home.idea_8.0}/lib/boot.jar" />
34   </path>
36   <target name="build" depends="jflex, all" />
38   <target name="jar" depends="build">
39     <mkdir dir="build" />
40     <jar file="build/RegExpSupport.jar" compress="false">
41       <fileset dir="${regexp-lang.output.dir}">
42         <include name="**/*.*" />
43         <exclude name="${excluded-stuff}" />
44       </fileset>
45       <fileset dir=".">
46         <include name="META-INF/plugin.xml" unless="regexp-lang.embedded"/>
47       </fileset>
48     </jar>
49   </target>
51   <target name="jflex">
52     <taskdef name="jflex" classname="JFlex.anttask.JFlexTask">
53       <classpath location="${jdk.home.idea_8.0}/tools/jflex/lib/JFlex.jar" />
54     </taskdef>
56     <jflex skeleton="${jdk.home.idea_8.0}/tools/jflex/idea-flex.skeleton"
57            file="src/org/intellij/lang/regexp/regexp-lexer.flex"
58            destdir="src"
59            nobak="true"
60            charat="true" />
61   </target>
63   <target name="test" depends="build" description="run tests">
64     <junit fork="true" dir="${basedir}" failureproperty="junit.failed" errorproperty="junit.failed">
65       <sysproperty key="idea.load.plugins" value="false" />
67       <bootclasspath refid="jdk.bootclasspath.idea_6.0" />
68       <classpath refid="jdk.classpath.idea_8.0" />
70       <classpath>
71         <pathelement location="${regexp-lang.output.dir}" />
72         <pathelement location="${regexp-lang.testoutput.dir}" />
73       </classpath>
75       <test name="test.MainParseTest">
76         <formatter type="plain" />
77       </test>
78     </junit>
80     <fail if="junit.failed" />
81   </target>
83   <target name="src.zip">
84     <zip file="${src.zip}" update="${src.zip.update}">
85       <zipfileset dir="src" prefix="RegExpSupport/src">
86         <include name="org/**/*.java" />
87         <include name="org/**/*.png" />
88         <include name="**/*.flex" />
89       </zipfileset>
90       <zipfileset dir="test" prefix="RegExpSupport/test">
91         <include name="**/*.java" />
92       </zipfileset>
93       <zipfileset dir="testData" prefix="RegExpSupport/testData">
94         <include name="**/*.regexp" />
95         <exclude name="psi/gen/**/*" />
96         <include name="**/*.xml" />
97       </zipfileset>
98       <zipfileset dir="." prefix="RegExpSupport">
99         <include name="build.xml" />
100         <include name="log4j.dtd" />
101         <include name="regexp-lang.xml" />
102         <include name="regexp-lang.ipr" />
103         <include name="regexp-lang.iml" />
104         <include name="regexp-lang-java.iml" />
105         <include name="META-INF/plugin.xml" />
106       </zipfileset>
107     </zip>
108   </target>
110   <target name="bin.zip" depends="jar">
111     <zip file="build/RegExpSupport.zip">
112       <zipfileset dir="build" prefix="RegExpSupport/lib">
113         <include name="*.jar" />
114       </zipfileset>
115     </zip>
116   </target>
118   <target name="zips" depends="bin.zip, src.zip" />
120 </project>