-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
85 lines (67 loc) · 2.45 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="JERPALang" default="makejar" basedir=".">
<!-- domovský adresář jaru -->
<property name="projecthome" value="." />
<!-- verze jaru -->
<property name="version" value="1.1.0-SNAPSHOT" />
<!-- symbolický název jaru -->
<property name="jarname" value="${ant.project.name}" />
<property name="jerpahome" value="../JERPA"/>
<!-- autor -->
<property name="author" value="Vaclav Souhrada" />
<property name="src" location="${projecthome}/src" />
<property name="build" location="${projecthome}/bin" />
<property name="jars" location="${projecthome}/jars" />
<property name="lib" location="${projecthome}/lib" />
<property name="deployloc" location="${jerpahome}/lib" />
<property name="runloc" location="${jars}" />
<property name="buildfilename" value="${jarname}-${version}.jar" />
<path id="compile.class.path">
<fileset dir=".">
<include name="lib/**/*.jar" />
</fileset>
</path>
<target name="init">
<mkdir dir="${build}" />
<mkdir dir="${jars}" />
<mkdir dir="${deployloc}" />
</target>
<target name="compile" depends="init">
<javac srcdir="${src}" destdir="${build}" classpathref="compile.class.path" debug="on">
<compilerarg value="-Xlint:none" />
</javac>
</target>
<target name="copy_files" depends="compile">
<copy todir="${build}/ch/ethz/origo/jerpa/jerpalang/">
<fileset dir="${src}/ch/ethz/origo/jerpa/jerpalang/" />
</copy>
</target>
<target name="makejar" description="generate the distribution" depends="copy_files">
<mkdir dir="${jars}" />
<jar jarfile="${jars}/${buildfilename}" basedir="${build}">
</jar>
<antcall target="autoclean" />
</target>
<!-- automatický úklid po kompilaci a vytvoření jaru-->
<target name="autoclean">
<delete dir="${build}" />
</target>
<!-- ručně prováděný úklid -->
<target name="clean">
<antcall target="autoclean" />
<delete dir="${jars}" />
<delete dir="${deploy}" />
</target>
<!-- volitelný target, který umožní vytvořený bundle nakopírovat
na libovolné místo na disku, Před použitím
je nutné změnit cestu deployloc -->
<target name="deploy" depends="makejar">
<delete file="${deployloc}/${buildfilename}" />
<copy file="${jars}/${buildfilename}" todir="${deployloc}"/>
</target>
<target name="run">
<echo message="Starting..." />
<echo message="JERPALang can not be runned alone" />
<echo message="Shutting down JERPALang" />
</target>
</project>