forked from AbeelLab/macaw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
141 lines (85 loc) · 2.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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?xml version="1.0"?>
<project name="Macaw SNP typer" basedir="." default="dist">
<property name="project" value="macaw" />
<property name="manifest.mainClass" value="abeellab.macaw.MacawSNPtyper" />
<fileset id="jarfiles" dir=".">
<include name="lib/atk-*.jar" />
<include name="lib/sam-*.jar" />
<include name="lib/jannot-*.jar" />
<include name="lib/ajt-*.jar" />
<include name="lib_compile/scala-2.10.2/scala-library.jar" />
</fileset>
<!-- Code below should not be changed -->
<property name="version" value="development" />
<property name="src" value="src/" />
<property name="build" value="build" />
<property name="dist" value="${project}-${version}" />
<property name="jar" value="${project}.jar" />
<path id="build.classpath">
<fileset refid="jarfiles" />
</path>
<echo message="${toString:build.classpath}" />
<pathconvert pathsep=" " property="manifest.classpath">
<path refid="build.classpath" />
<mapper>
<chainedmapper>
<flattenmapper />
<globmapper from="*.jar" to="*.jar" />
</chainedmapper>
</mapper>
</pathconvert>
<echo message="${manifest.classpath}" />
<target name="dist">
<!-- Define scala compiler task -->
<taskdef resource="scala/tools/ant/antlib.xml">
<classpath>
<fileset refid="jarfiles" />
<fileset dir="lib_compile">
<include name="**/*.jar" />
</fileset>
</classpath>
</taskdef>
<delete dir="${build}" failonerror="false" />
<delete dir="${dist}" failonerror="false" />
<mkdir dir="${build}" />
<mkdir dir="${dist}" />
<mkdir dir="${dist}/${project}-${version}" />
<copy todir="${dist}/${project}-${version}">
<fileset dir="lib/" >
<include name="*.jar" />
</fileset>
<fileset dir="lib_compile/scala-2.10.2">
<include name="scala-library.jar" />
</fileset>
<fileset dir="python">
<include name="*.py" />
</fileset>
</copy>
<propertyfile file="${build}/tool.properties">
<entry key="program" value="${project}" />
<entry key="version" value="${version}" />
</propertyfile>
<scalac destdir="${build}" excludes="junit/**" srcdir="${src}">
<classpath path="${toString:build.classpath}">
</classpath>
</scalac>
<javac debug="true" debuglevel="lines,vars,source" destdir="${build}" excludes="junit/*.java" source="1.6" srcdir="${src}" target="1.6">
<classpath path="${toString:build.classpath}">
</classpath>
</javac>
<copy todir="${build}/">
<fileset dir="resources">
<include name="*.txt" />
</fileset>
</copy>
<jar basedir="${build}" destfile="${dist}/${project}-${version}/${jar}">
<manifest>
<attribute name="Main-Class" value="${manifest.mainClass}" />
<attribute name="Class-Path" value="${manifest.classpath}" />
</manifest>
</jar>
<zip basedir="${dist}" destfile="${dist}.zip" />
<delete dir="${dist}" failonerror="false" />
<delete dir="${build}" failonerror="false" />
</target>
</project>