-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.xml
executable file
·75 lines (74 loc) · 2.64 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="bigjar" name="aibu" xmlns:ivy="antlib:org.apache.ivy.ant">
<property environment="env" />
<property name="debuglevel" value="source,lines,vars" />
<property name="target" value="1.5" />
<property name="source" value="1.5" />
<property name="version" value="0.3" />
<target name="ivy">
<path id="ivy.lib.path">
<fileset dir="/usr/share/java/" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
<target name="init" depends="ivy">
<mkdir dir="bin" />
<mkdir dir="deploy" />
</target>
<target name="clean">
<delete dir="bin" />
<delete dir="deploy" />
</target>
<target depends="clean" name="cleanall" />
<target name="build" depends="init,resolve">
<echo message="Building Aibu editor" />
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" srcdir="src" source="${source}" target="${target}" includeantruntime="false">
<classpath>
<path location="bin" />
<fileset dir="deploy">
<include name="coffeeshop*.jar" />
</fileset>
</classpath>
</javac>
<copy todir="bin">
<fileset dir="src" excludes="**/*.launch, **/*.java"/>
</copy>
</target>
<target name="jar" depends="build">
<jar destfile="deploy/aibu-base.jar" basedir="bin">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Main-Class" value="si.vicos.annotations.editor.Annotator" />
</manifest>
</jar>
</target>
<target name="resolve" description="Retreive dependencies with ivy">
<ivy:retrieve pattern="deploy/[module].[artifact].[ext]" />
</target>
<target name="publish-version" depends="bigjar">
<ivy:resolve revision="${version}" />
<ivy:publish resolver="local" pubrevision="${version}" status="release" update="true" overwrite="true">
<artifacts pattern="deploy/[artifact].[ext]" />
</ivy:publish>
</target>
<target name="publish-working" depends="bigjar">
<ivy:resolve />
<ivy:publish resolver="local" status="release" update="true" overwrite="true">
<artifacts pattern="deploy/[artifact].[ext]" />
</ivy:publish>
</target>
<target name="bigjar" depends="jar" description="Build one big jar">
<jar destfile="deploy/aibu.jar">
<zipgroupfileset dir="deploy">
<filename name="*.jar" />
<not>
<filename name="aibu.jar" />
</not>
</zipgroupfileset>
<manifest>
<attribute name="Main-Class" value="si.vicos.annotations.editor.Annotator" />
</manifest>
</jar>
<chmod file="deploy/aibu.jar" perm="755" />
</target>
</project>