forked from octopus-platform/joern
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
117 lines (100 loc) · 3.68 KB
/
Copy pathbuild.xml
File metadata and controls
117 lines (100 loc) · 3.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?xml version="1.0"?>
<project name="Joern" default="jar" basedir=".">
<property environment="env"/>
<property name="src.dir" location="src" />
<property name="build.dir" location="bin" />
<property name="lib.dir" location="lib" />
<property name="test.dir" location="src" />
<property name="test.report.dir" location="testreport" />
<!-- Junit class path -->
<path id="junit.class.path">
<pathelement location="${lib.dir}/junit.jar" />
<pathelement location="${lib.dir}/hamcrest-core-1.3.jar" />
<pathelement location="${lib.dir}/geronimo-jta_1.1_spec-1.1.1.jar"/>
<pathelement location="${build.dir}" />
</path>
<!-- Add jars to the classpath -->
<path id="joern.classpath">
<pathelement location="bin"/>
<path refid="junit.class.path"/>
<pathelement location="${lib.dir}/antlr4-runtime-4.2.1-SNAPSHOT.jar"/>
<pathelement location="${lib.dir}/antlr4-annotations-4.2.1-SNAPSHOT.jar"/>
<pathelement location="${lib.dir}/commons-cli-1.2.jar"/>
<pathelement location="${lib.dir}/hamcrest-core-1.3.jar"/>
<pathelement location="${lib.dir}/lucene-core-3.6.2.jar"/>
<pathelement location="${lib.dir}/neo4j-kernel-2.1.8.jar"/>
<pathelement location="${lib.dir}/neo4j-lucene-index-2.1.8.jar"/>
<pathelement location="${lib.dir}/neo4j-primitive-collections-2.1.8.jar"/>
</path>
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${test.report.dir}" />
</target>
<target name="makedir">
<mkdir dir="${build.dir}" />
<mkdir dir="${test.report.dir}" />
</target>
<target name="compile">
<javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="false">
<src path="src"/>
<classpath refid="joern.classpath"/>
</javac>
</target>
<target name="jar" depends="clean,makedir,compile">
<jar destfile="${build.dir}/joern.jar"
basedir="${build.dir}"
includes="**/*.class">
<manifest>
<attribute name="Main-Class" value="tools.index.IndexMain" />
</manifest>
<fileset dir="${build.dir}" includes="**/*.class" />
<zipgroupfileset dir="${lib.dir}" includes="**/*.jar" />
</jar>
</target>
<target name="tools" depends="icfg,argumentTainter">
</target>
<target name="prepareTestDB" depends="tools">
<exec executable="${env.SHELL}">
<arg value="rebuildTestDB.sh"/>
</exec>
</target>
<target name="test" depends="jar, prepareTestDB">
<junit printsummary="yes" haltonfailure="false">
<classpath refid="joern.classpath" />
<formatter type="xml" />
<batchtest fork="yes" todir="${test.report.dir}" skipnontests="true">
<fileset dir="${test.dir}">
<include name="tests/**/*.java" />
</fileset>
</batchtest>
</junit>
<junitreport todir="${test.report.dir}">
<fileset dir="${test.report.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${test.report.dir}/html"/>
</junitreport>
</target>
<target name="icfg" depends="compile">
<jar destfile="${build.dir}/icfg.jar"
basedir="${build.dir}"
includes="**/*.class">
<manifest>
<attribute name="Main-Class" value="tools.icfg.ICFGMain" />
</manifest>
<fileset dir="${build.dir}" includes="**/*.class" />
<zipgroupfileset dir="${lib.dir}" includes="**/*.jar" />
</jar>
</target>
<target name="argumentTainter" depends="compile">
<jar destfile="${build.dir}/argumentTainter.jar"
basedir="${build.dir}"
includes="**/*.class">
<manifest>
<attribute name="Main-Class" value="tools.argumentTainter.ArgumentTainterMain" />
</manifest>
<fileset dir="${build.dir}" includes="**/*.class" />
<zipgroupfileset dir="${lib.dir}" includes="**/*.jar" />
</jar>
</target>
</project>