-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·141 lines (121 loc) · 5 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<project name="Sztakipedia parser" default="help" basedir=".">
<!-- usage -->
<target name="help">
<echo message="Common build targets:" />
<echo message=" jar - Builds .jar file" />
<echo message=" build - Same as clean+jar" />
<echo message=" compile - Compiles classes" />
<echo message=" clean - Delete generated binary files" />
<echo message=" war - Builds the WAR file to be deployed in a servlet container"/>
<echo message=" javadoc - Builds Javadoc documentation"/>
<echo message=" src-zip - Creates a source release"/>
</target>
<!-- names -->
<property name="name" value="sztakipedia-parser" />
<property name="name.official" value="Sztakipedia parser" />
<property name="version" value="0.1.1b" />
<!-- directories -->
<property name="lib.dir" value="lib" />
<property name="dist.dir" value="target" />
<property name="docs.dir" value="docs" />
<property name="build.dir" value="${dist.dir}/classes" />
<property name="build.sysclasspath" value="last"/>
<property name="src.dir" value="src/main/java" />
<property name="res.dir" value="src/main/resources" />
<property name="javadoc.dir" value="${docs.dir}/javadoc" />
<!-- files -->
<property name="jar.file" value="${name}-${version}.jar" />
<property name="src.zip.file" value="${name}-${version}-src.zip" />
<property name="war.file" value="${name}-${version}.war" />
<!-- main -->
<property name="main.class" value="hu.sztaki.sztakipediaparser.wiki.parser.Parser" />
<!-- copyright -->
<property name="copyright.holder" value="MTA SZTAKI" />
<property name="copyright.year" value="2011" />
<property name="copyright.message" value="<div class='copyright'>${name.official} ${version} API Documentation &ndash; Copyright &copy; ${copyright.year} ${copyright.holder}</div>"/>
<!-- include -->
<property file="build.properties"/>
<!-- path -->
<path id="classpath">
<fileset dir="${lib.dir}" casesensitive="true">
<include name="*.jar" />
</fileset>
</path>
<!-- targets -->
<target name="all" depends="build,javadoc,src-zip"/>
<target name="build" depends="clean,jar"/>
<target name="jar" depends="compile">
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<mkdir dir="${dist.dir}"/>
<delete file="${dist.dir}/${jar.file}"/>
<delete file="MANIFEST.MF"/>
<jar jarfile="${dist.dir}/${jar.file}">
<fileset dir="${build.dir}"/>
<fileset dir="${res.dir}" />
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="${main.class}"/>
<attribute name="Built-Date" value="${TODAY}"/>
</manifest>
</jar>
</target>
<target name="compile">
<mkdir dir="${build.dir}"/>
<javac
srcdir="${src.dir}"
destdir="${build.dir}"
debug="true"/>
<copy todir="${build.dir}">
<fileset dir="${src.dir}">
<include name="**/*.xsl" />
<include name="**/*.gif" />
<include name="**/*.jpg" />
<include name="**/*.txt" />
<include name="**/*.xml" />
<include name="**/LICENSE*" />
<include name="**/*.properties" />
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="${dist.dir}"/>
</target>
<target name="war" depends="jar">
<war destfile="${dist.dir}/${war.file}" webxml="conf/web.xml">
<lib dir="${dist.dir}">
<exclude name="jdbc1.jar"/>
<exclude name="${war.file}"/>
</lib>
</war>
</target>
<target name="javadoc" description="o Create Javadocs for the demo">
<mkdir dir="${javadoc.dir}"/>
<javadoc
access="public"
destdir="${javadoc.dir}"
author="true"
version="true"
use="true"
additionalparam="-notimestamp"
windowtitle="${name.official}"
doctitle="${name.official} ${version} API Documentation "
bottom="${copyright.message}"
header="${copyright.message}"
footer="${copyright.message}"
>
<link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
<fileset dir="${src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
</javadoc>
</target>
<target name="src-zip">
<mkdir dir="${dist.dir}"/>
<delete file="${dist.dir}/${src.zip.file}"/>
<zip destfile="${dist.dir}/${src.zip.file}"
basedir="${src.dir}"
includes="**/*.java,**/*.properties,**/LICENSE*,**/*.txt,**/*.xml"/>
</target>
</project>