build.xml 4.09 KB
Newer Older
ISWB Prasetya's avatar
ISWB Prasetya committed
1
<project name="T3supportTools">
2
3
4
5
6
7

<!-- Need Java-8. Set JAVA_HOME to Java8 before running this build -->

	<property name="build" value="../../build/t3tools" />
	
	<target name="init">
ISWB Prasetya's avatar
ISWB Prasetya committed
8
        <mkdir dir="${build}/classes" />
9
10
	</target>
    
ISWB Prasetya's avatar
ISWB Prasetya committed
11
12
    <target name="compileT3daikon" depends="init" description="Compile t3daikon">
	    <echo>Compiling t3daikon... </echo>
uprime815's avatar
uprime815 committed
13
14
15
		<javac srcdir="./daikon/src" 
		    compiler="javac1.8"
			debug="on" 
ISWB Prasetya's avatar
ISWB Prasetya committed
16
			destdir="${build}/classes" 
uprime815's avatar
uprime815 committed
17
18
19
20
			source="1.8" 
			target="1.8">
		  <compilerarg value="-Xlint"/>
          <classpath>
ISWB Prasetya's avatar
ISWB Prasetya committed
21
22
23
              <fileset dir="./daikon/libs">
                <include name="*.jar"/>
              </fileset>
uprime815's avatar
uprime815 committed
24
25
26
27
          </classpath>
		</javac>
	</target>
    
ISWB Prasetya's avatar
ISWB Prasetya committed
28
29
	<target name="compileCPscanner" depends="init" description="Compile cp-scanner">
	    <echo>Compiling cpscanner... </echo>
30
31
32
		<javac srcdir="./cpscanner/src" 
		    compiler="javac1.8"
			debug="on" 
ISWB Prasetya's avatar
ISWB Prasetya committed
33
			destdir="${build}/classes" 
34
35
36
37
			source="1.8" 
			target="1.8">
		  <compilerarg value="-Xlint"/>
          <classpath>
ISWB Prasetya's avatar
ISWB Prasetya committed
38
39
40
              <fileset dir="./cpscanner/libs">
                <include name="*.jar"/>
              </fileset>
41
42
43
44
45
          </classpath>
		</javac>
	</target>
	
	
ISWB Prasetya's avatar
ISWB Prasetya committed
46
47
	<target name="compileStandingen" depends="init" description="Compile standIn generator">
	    <echo>Compiling standIn generator ... </echo>
48
49
50
		<javac srcdir="./standingen/src" 
		    compiler="javac1.8"
			debug="on" 
ISWB Prasetya's avatar
ISWB Prasetya committed
51
			destdir="${build}/classes" 
52
53
54
55
56
57
58
			source="1.8" 
			target="1.8">
		  <compilerarg value="-Xlint"/>
		</javac>
	</target>
	
	
ISWB Prasetya's avatar
ISWB Prasetya committed
59
60
	<target name="compileT3configure" depends="init" description="Compile the T3-configure-lib">
	    <echo>Compiling T3 configure-lib... </echo>
61
62
63
		<javac srcdir="./configure/src" 
		    compiler="javac1.8"
			debug="on" 
ISWB Prasetya's avatar
ISWB Prasetya committed
64
			destdir="${build}/classes" 
65
66
67
68
			source="1.8" 
			target="1.8">
		  <compilerarg value="-Xlint"/>
		  <classpath>
ISWB Prasetya's avatar
ISWB Prasetya committed
69
		      <pathelement location="./daikon/libs/T3.jar"/>
70
71
72
          </classpath>
		</javac>
	</target>
uprime815's avatar
uprime815 committed
73
    
ISWB Prasetya's avatar
ISWB Prasetya committed
74
    <target name="compileAll" description="Compiling all tools..." depends="compileT3daikon,compileCPscanner,compileStandingen,compileT3configure">  
uprime815's avatar
uprime815 committed
75
    </target>
76

77
78
79
80
81
82
83
84
85
86
87

    <!-- for jarring CPscanner only (along with all its dependencies). Run clean first! -->
    <target name="CPscannerJar" description="Jarring CPscanner..." depends="compileCPscanner">  
		<echo>Jarring all T3 support tools classes... </echo>
		<jar basedir="${build}/classes" destfile="${build}/CPscanner.jar" > 
            <zipfileset src="./cpscanner/libs/guava-14.0.1.jar"   includes="**/*.class"/>
            <zipfileset src="./cpscanner/libs/reflections-0.9.9-RC1-uberjar.jar"   includes="**/*.class"/>
            <zipfileset src="./cpscanner/libs/javassist.jar"   includes="**/*.class"/>
		</jar>
    </target>
    
88
89
90
91
92
93
94
    <!-- for jarring T3daikon only. Run clean first! -->
    <target name="T3daikonJar" description="Jarring T3daikon ..." depends="compileT3daikon">  
		<echo>Jarring the T3daikon tool... </echo>
		<jar basedir="${build}/classes" destfile="${build}/T3daikon.jar" > 
            <zipfileset src="./daikon/libs/daikon.jar"   includes="**/*.class,**/*.properties"/>
		</jar>
    </target>
95
    
ISWB Prasetya's avatar
ISWB Prasetya committed
96
97
98
99
100
101
102
    <!-- this will jar all those support tools, and also add T3-static into the jar.
         Also jar along  all 3rd party dependency. 
         Does not include T3 itself.
    -->     
    <target name="jar" description="Jarring all T3 support tools..." depends="compileAll">  
		<echo>Jarring all T3 support tools classes... </echo>
		<jar basedir="${build}/classes" destfile="${build}/t3SupportTools.jar" > 
ISWB Prasetya's avatar
ISWB Prasetya committed
103
            <zipfileset src="./T3static_v0.jar" includes="**/*.class"/>
104
            <zipfileset src="./daikon/libs/daikon.jar"   includes="**/*.class,**/*.properties"/>
ISWB Prasetya's avatar
ISWB Prasetya committed
105
106
107
            <zipfileset src="./cpscanner/libs/guava-14.0.1.jar"   includes="**/*.class"/>
            <zipfileset src="./cpscanner/libs/reflections-0.9.9-RC1-uberjar.jar"   includes="**/*.class"/>
            <zipfileset src="./cpscanner/libs/javassist.jar"   includes="**/*.class"/>
ISWB Prasetya's avatar
ISWB Prasetya committed
108
109
110
111
		</jar>
    </target>
    
    
112
113
114
115
116
117
	<target name="clean" description="Cleaning.">
		<echo>Cleaning... </echo>
		<delete dir="${build}" />
	</target>

</project>