1 <project name="testng" default="dist">
3 <property file="build.properties"/>
4 <property name="src.dir" value="src"/>
5 <property name="test.dir" value="tests"/>
6 <property name="lib.dir" value="lib"/>
7 <property name="bin.dir" value="build"/>
8 <property name="dst.dir" value="dist"/>
10 <property name="idea.home" value="/Users/amrk/Applications/Selena.app"/>
11 <property name="idea.plugins.home" value="/Users/amrk/Applications/Selena.app/plugins"/>
13 <path id="compile.classpath">
14 <fileset dir="${idea.home}/lib">
15 <include name="openapi.jar"/>
16 <include name="idea.jar"/>
17 <include name="idea_rt.jar"/>
18 <include name="jdom.jar"/>
19 <include name="bcel.jar"/>
20 <include name="junit.jar"/>
21 <include name="log4j.jar"/>
22 <include name="extensions.jar"/>
23 <include name="picocontainer.jar"/>
24 <include name="trove4j.jar"/>
26 <fileset dir="${idea.home}/redist">
27 <include name="annotations.jar"/>
28 <include name="forms_rt.jar"/>
29 <include name="extensions.jar"/>
30 <include name="javac2.jar"/>
33 <include name="testng-*.jar"/>
38 <path id="uidesigner.classpath">
39 <fileset dir="${idea.home}/lib">
40 <include name="jdom.jar"/>
41 <include name="bcel.jar"/>
42 <include name="asm.jar"/>
43 <include name="asm-commons.jar"/>
44 <include name="jgoodies-forms.jar"/>
46 <fileset dir="${idea.home}/redist">
47 <include name="annotations.jar"/>
48 <include name="forms_rt.jar"/>
49 <include name="extensions.jar"/>
50 <include name="javac2.jar"/>
54 <taskdef name="javac2"
55 classname="com.intellij.ant.Javac2"
56 classpathref="uidesigner.classpath"/>
59 <mkdir dir="${bin.dir}/classes"/>
60 <mkdir dir="${bin.dir}/classes.test"/>
61 <mkdir dir="${bin.dir}/jars"/>
62 <mkdir dir="${dst.dir}"/>
66 <delete dir="${bin.dir}"/>
67 <delete dir="${dst.dir}"/>
70 <target name="compile" depends="init">
71 <javac2 srcdir="${src.dir}" destdir="${bin.dir}/classes" debug="true" classpathref="compile.classpath"
72 deprecation="true" source="1.5" target="jsr14"/>
73 <copy todir="${bin.dir}/classes">
74 <fileset dir="${src.dir}">
75 <include name="**/*.properties"/>
80 <target name="build" depends="clean, compile"/>
83 <target name="dist" depends="build">
85 <jar jarfile="${bin.dir}/jars/${ant.project.name}.jar">
86 <zipfileset dir="${bin.dir}/classes"/>
87 <zipfileset dir="${src.dir}/resources" prefix="resources"/>
88 <zipfileset dir="src/META-INF" prefix="META-INF">
89 <include name="plugin.xml"/>
92 <jar jarfile="${bin.dir}/jars/resources_en.jar">
93 <zipfileset dir="${src.dir}">
94 <include name="**/*.html"/>
97 <zip destfile="${dst.dir}/${ant.project.name}.zip" compress="true">
98 <zipfileset dir="${lib.dir}" prefix="${ant.project.name}/lib">
99 <include name="testng-jdk15.jar"/>
101 <zipfileset dir="${bin.dir}/jars" prefix="${ant.project.name}/lib" includes="*.jar"/>
102 <zipfileset dir="${lib.dir}" prefix="${ant.project.name}/lib-jdk14">
103 <include name="testng-jdk14.jar"/>
105 <zipfileset dir="src/META-INF" prefix="${ant.project.name}/META-INF">
106 <include name="plugin.xml"/>
112 <target name="deploy" depends="dist">
113 <unzip src="${dst.dir}/${ant.project.name}.zip" dest="${idea.plugins.home}"/>