-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
98 lines (86 loc) · 3.77 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, see <http://www.gnu.org/licenses/>
-->
<project name="DataSetTransformer" default="all" basedir=".">
<!-- Global Variables -->
<property name="build" location="bin"/>
<property name="src" location="src"/>
<property name="test" location="test"/>
<property name="rel" location="rel"/>
<property name="relcfg" location="${rel}/cfg"/>
<property name="rellib" location="${rel}/lib"/>
<property name="lib" location="lib"/>
<property name="ServerJar" location="${rel}/${ant.project.name}.jar"/>
<property name="ServerMainClass" value="org.Transformer.Main"/>
<property name="javadoc" location="${rel}/doc"/>
<path id="project.class.path">
<fileset dir="lib" includes="*.jar"/>
<pathelement location="${src}" />
</path>
<target name="clean" description="Prepare for building" >
<!-- Create the time stamp -->
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<!-- Delete everything dynamically created -->
<delete dir="${build}"/>
<delete dir="${javadoc}"/>
<delete dir="${rel}"/>
<delete file="${ServerJar}"/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${javadoc}"/>
<mkdir dir="${rel}"/>
<mkdir dir="${rellib}"/>
</target>
<!-- Compile all *.java Files -> create *.class files -->
<target name="compile" depends="clean" description="compile *.java to *.class" >
<javac srcdir="${src}" destdir="${build}" debug="true" includeantruntime="false">
<classpath refid="project.class.path"/>
</javac>
</target>
<!-- Create Dokumentation -->
<target name="javadoc" depends="clean" description="create Documentation" >
<javadoc packagenames="org.Transformer.*"
sourcepath="${src}"
destdir="${javadoc}"
Overview="${src}/overview.html"
Version="yes"
Use="yes"
Author="yes"
serialwarn="yes"
Encoding="UTF-8">
<classpath refid="project.class.path"/>
</javadoc>
</target>
<!-- create the jar file -->
<target name="jar" depends="compile" description="create the Jar File">
<copy file="log4j.properties" todir="${build}"/>
<jar destfile="${ServerJar}"
includesfile="log4j.properties"
includes="**/*.class">
<fileset dir="${build}"/>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Built-Date" value="${TODAY}"/>
<attribute name="Main-Class" value="${ServerMainClass}"/>
<attribute name="Class-Path" value=". lib/jdom.jar lib/jericho-html-3.1 lib/jtidy-1.0.2-SNAPSHOT.jar lib/logback-classic-1.0.13.jar lib/logback-core-1.0.13.jar lib/mysql-connector-java-3.0.17-ga-bin.jar lib/slf4j-api-1.6.1.jar"/>
</manifest>
</jar>
<copy todir="${rellib}">
<fileset dir="${lib}"/>
</copy>
</target>
<!-- build everything, javadoc -->
<target name="all" depends="jar">
</target>
</project>