forked from lpolech/hiervis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathant_build.xml
68 lines (59 loc) · 1.92 KB
/
ant_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
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="hiervis">
<property environment="env" />
<property name="target" value="1.8" />
<property name="source" value="1.8" />
<property name="main-class" value="pl.pwr.hiervis.HierVis" />
<path id="hiervis.classpath">
<!-- Build the classpath: include the bin/ folder and every *.jar in lib/ folder. -->
<pathelement location="bin" />
<fileset dir="${basedir}/">
<include name="lib/*.jar" />
</fileset>
</path>
<pathconvert property="mf.classpath" pathsep=" ">
<!-- Prepare the manifest file class path -->
<path refid="hiervis.classpath" />
<mapper>
<chainedmapper>
<flattenmapper />
<globmapper from="*.jar" to="lib/*.jar" />
</chainedmapper>
</mapper>
</pathconvert>
<target name="compile">
<!-- Copy source files to the bin/ folder -->
<mkdir dir="bin" />
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.launch" />
<exclude name="**/*.java" />
</fileset>
</copy>
<!-- Compile them -->
<javac debug="true" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
<src path="src" />
<classpath refid="hiervis.classpath" />
</javac>
</target>
<target name="build" depends="compile">
<mkdir dir="build" />
<mkdir dir="build/lib" />
<!-- Assemble the skel folder, lib, and compiled project into a build -->
<copy includeemptydirs="true" todir="build">
<fileset dir="skel" />
</copy>
<copy includeemptydirs="true" todir="build/lib">
<fileset dir="lib" />
</copy>
<copy file="LICENSE" todir="build/"/>
<jar basedir="bin" destfile="build/hv.jar">
<manifest>
<attribute name="Main-Class" value="${main-class}" />
<attribute name="Class-Path" value="${mf.classpath}" />
</manifest>
</jar>
<!-- Clean up the bin foler so's not to litter -->
<!--<delete dir="bin" /> -->
</target>
</project>