forked from stuckyb/ontopilot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
58 lines (52 loc) · 1.93 KB
/
build.xml
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
<!--
-->
<project name="ontopilot" default="all">
<property name="dist" value="${basedir}/dist" />
<property name="build" value="${basedir}/build" />
<property name="java-lib" value="${basedir}/java-lib" />
<property name="python-lib" value="${basedir}/python-lib" />
<property name="java-src" value="${basedir}/java-src" />
<property name="python-src" value="${basedir}/python-src"/>
<property name="jython-jar" value="${basedir}/java-lib/jython-standalone-2.7.0.jar"/>
<property name="resources" value="${basedir}/template_files"/>
<target name="init" description="Initialisation">
<mkdir dir="${dist}"/>
<mkdir dir="${build}"/>
</target>
<target name="clean" description="cleanup all of the temporary files and directories">
<delete dir="${dist}"/>
<delete dir="${build}"/>
</target>
<target name="build" description="build the jython launcher">
<unzip src="${jython-jar}" dest="${build}"/>
<javac srcdir="${java-src}" destdir="${build}" includeantruntime="false"/>
</target>
<target name="assemble" description="assemble the jython standalone JAR">
<!-- Setup the Python Libs -->
<copy todir="${build}/Lib">
<fileset dir="${python-lib}">
<include name="**/*.py"/>
</fileset>
</copy>
<!-- Setup the Python sources -->
<copy todir="${build}/Lib">
<fileset dir="${python-src}">
<include name="**/*.py"/>
</fileset>
</copy>
<!-- Copy template files and test_files -->
<copy todir="${build}/template_files">
<fileset dir="${resources}">
<include name="**/*.*"/>
</fileset>
</copy>
<!-- package the new JAR -->
<jar destfile="${dist}/${ant.project.name}.jar" basedir="${build}">
<zipgroupfileset dir="${java-lib}" includes="*.jar" excludes="${jython-jar}"/>
<manifest>
<attribute name="Main-Class" value="Main"/>
</manifest>
</jar>
</target>
<target name="all" depends="init, build, assemble" description="Runs the two targets"/>
</project>