-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
81 lines (72 loc) · 2.66 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
<?xml version="1.0"?>
<project name="EscidocAnalyzers" default="jar" basedir=".">
<property name="build.dir" value="build" />
<property name="src.dir" value="src" />
<property name="dist.dir" value="dist" />
<property name="lib.dir" value="lib" />
<property name="bin.dir" value="bin" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="sources.dir" value="sources" />
<property name="project.name" value="escidoc-analyzers" />
<path id="classpath">
<pathelement path="${classpath}" />
<fileset dir="${lib.dir}" includes="**/*.jar" />
</path>
<!-- Cleans the output folders -->
<target name="clean" description="Cleans the output folders">
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
<delete includeEmptyDirs="true">
<fileset dir="${build.dir}">
<include name="**/*"/>
</fileset>
</delete>
<delete includeEmptyDirs="true">
<fileset dir="${dist.dir}">
<include name="**/*"/>
</fileset>
</delete>
</target>
<!-- Creates the output folders -->
<target name="prepare" depends="clean" description="Creates the output folders">
<mkdir dir="${classes.dir}"/>
</target>
<!-- Kompilieren -->
<target name="compile" depends="prepare" description="Compiles source code">
<javac destdir="${classes.dir}" debug="on">
<classpath refid="classpath"/>
<src path="${src.dir}"/>
</javac>
</target>
<!-- Archiv erzeugen -->
<target name="jar" depends="compile, sources" description="Generates escidoc-analyzers.jar in the 'dist' directory.">
<!-- Exclude unit tests from the final JAR file -->
<jar jarfile="${dist.dir}/${project.name}.jar"
basedir="${classes.dir}"/>
<delete includeEmptyDirs="true">
<fileset dir="${build.dir}">
<include name="**/classes/**/*"/>
</fileset>
</delete>
</target>
<target name="sources" description="Pack sources for download.">
<delete dir="${sources.dir}"/>
<mkdir dir="${sources.dir}"/>
<mkdir dir="${sources.dir}/${project.name}"/>
<copy todir="${sources.dir}/${project.name}">
<fileset dir=".">
<exclude name="${build.dir}/*/**"/>
<exclude name="${bin.dir}/*/**"/>
<exclude name="${dist.dir}/*/**"/>
<exclude name="${sources.dir}/**"/>
<exclude name="${docu.dir}/**"/>
<exclude name="**/.svn"/>
<exclude name=".classpath"/>
<exclude name=".project"/>
</fileset>
</copy>
<zip zipfile="${dist.dir}/${project.name}-sources.zip"
basedir="${sources.dir}/${project.name}" includes="**"/>
<delete dir="${sources.dir}"/>
</target>
</project>