-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
57 lines (49 loc) · 1.69 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
<?xml version="1.0"?>
<project name="eSciDocCoreCommon" 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="classes.dir" value="${build.dir}/classes" />
<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" description="Generates common.jar in the 'dist' directory.">
<!-- Exclude unit tests from the final JAR file -->
<jar jarfile="${dist.dir}/common.jar"
basedir="${classes.dir}"/>
<delete includeEmptyDirs="true">
<fileset dir="${build.dir}">
<include name="**/classes/**/*"/>
</fileset>
</delete>
</target>
</project>