-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
executable file
·153 lines (135 loc) · 4.99 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
142
143
144
145
146
147
148
149
150
151
152
153
<?xml version="1.0" encoding="utf-8"?>
<!-- ============================================================= -->
<project name="BLAST Viewer Tool" default="help" basedir=".">
<property file="${basedir}/src/bzh/plealog/blastviewer/version.properties"/>
<property name="pbc.libName" value="${prg.name}" />
<property name="pbc.LibVersion" value="${prg.version}" />
<property name="compile.optimize" value="on" />
<property name="compile.debug" value="off" />
<property name="src" value="${basedir}/src" />
<property name="jar" value="${basedir}/jar" />
<property name="distrib" value="${basedir}/distrib" />
<property name="Dlib" value="${distrib}/lib" />
<property name="Dsrc" value="${distrib}/src" />
<property name="Ddoc" value="${distrib}/doc" />
<property name="Ddoc.api" value="${Ddoc}/api" />
<property name="pbc.libJar" value="${distrib}/${pbc.libName}-${pbc.LibVersion}.jar"/>
<path id="class.path">
<pathelement path="${classpath}"/>
<fileset dir="${jar}">
<include name="**/*.jar"/>
</fileset>
<pathelement location="${Dlib}"/>
</path>
<!-- ============================================================= -->
<target name="help">
<echo>Ant task to handle BLAST Viewer Tool project.</echo>
<echo/>
<echo> compile: compile the code.</echo>
<echo> makedistrib: compile and make release JAR of the BLAST system.</echo>
<echo/>
<echo> Ant version: ${ant.version}</echo>
<echo> Java version: ${ant.java.version}</echo>
</target>
<!-- ============================================================= -->
<target name="prepare">
<echo/>
<echo> Ant version: ${ant.version}</echo>
<echo> Java version: ${ant.java.version}</echo>
<echo/>
<delete dir="${distrib}"/>
<mkdir dir="${Dlib}"/>
<mkdir dir="${Dsrc}"/>
<mkdir dir="${Ddoc.api}"/>
</target>
<!-- ============================================================= -->
<target name="is-java-eight">
<condition property="java.eight">
<equals arg1="${ant.java.version}" arg2="1.8"/>
</condition>
</target>
<target name="javac8" depends="is-java-eight" if="java.eight">
<javac srcdir="${Dsrc}"
destdir="${Dlib}"
classpathref="class.path"
debug="${compile.debug}"
optimize="${compile.optimize}"
>
</javac>
</target>
<!-- added for TravisCI -->
<target name="javac9" depends="is-java-eight" unless="java.eight">
<javac srcdir="${Dsrc}"
destdir="${Dlib}"
classpathref="class.path"
debug="${compile.debug}"
optimize="${compile.optimize}"
>
<compilerarg line="--add-modules java.se.ee"/>
</javac>
</target>
<!-- ============================================================= -->
<target name="compile" depends="prepare">
<copy todir="${Dsrc}">
<fileset dir="${src}">
<include name="bzh/plealog/blastviewer/**"/>
</fileset>
</copy>
<antcall target="javac8"/>
<antcall target="javac9"/>
<copy todir="${Dlib}/bzh/plealog/blastviewer/">
<fileset dir="${Dsrc}/bzh/plealog/blastviewer/">
<include name="**/*properties"/>
<include name="**/*messages"/>
<include name="**/*cfg"/>
<include name="**/*conf"/>
<include name="**/*gif"/>
<include name="**/*png"/>
<include name="**/*xml"/>
<include name="**/*zml"/>
</fileset>
</copy>
</target>
<!-- ============================================================= -->
<target name="makejar" depends="compile" >
<jar destfile="${pbc.libJar}">
<fileset dir="${Dlib}">
<include name="bzh/plealog/blastviewer/**"/>
</fileset>
<manifest>
<attribute name="Main-Class" value="bzh.plealog.blastviewer.BlastViewer"/>
<attribute name="Built-By" value="Patrick G. Durand"/>
<attribute name="Title" value="${prg.name}"/>
<attribute name="Version" value="${prg.version}"/>
</manifest>
</jar>
<jar destfile="${pbc.libJar}" update="true">
<zipfileset dir="${basedir}" includes="*.txt"/>
</jar>
</target>
<!-- ============================================================= -->
<target name="makedistrib" depends="compile" >
<jar destfile="${pbc.libJar}">
<fileset dir="${Dlib}">
<include name="bzh/plealog/blastviewer/**"/>
</fileset>
<restrict>
<name name="**/*"/>
<archives>
<zips>
<fileset dir="jar" includes="**/*.jar"/>
</zips>
</archives>
</restrict>
<manifest>
<attribute name="Main-Class" value="bzh.plealog.blastviewer.BlastViewer"/>
<attribute name="Built-By" value="Patrick G. Durand"/>
<attribute name="Title" value="${prg.name}"/>
<attribute name="Version" value="${prg.version}"/>
</manifest>
</jar>
<jar destfile="${pbc.libJar}" update="true">
<zipfileset dir="${basedir}" includes="*.txt"/>
</jar>
</target>
</project>