forked from mwahle/Hello-Wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
88 lines (77 loc) · 2.89 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
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2011 Manuel Wahle
!
! This file is part of Hello-Wiki.
!
! Hello-Wiki is free software: you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation, either version 3 of the License, or
! (at your option) any later version.
!
! Hello-Wiki 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 Hello-Wiki. If not, see <http://www.gnu.org/licenses/>.
-->
<project name="Hello-Wiki" basedir="." default="main">
<!-- paths to all major locations(srcdir, builddir, etc.) -->
<property name="src.dir" value="src" />
<property name="lib.dir" value="lib" />
<property name="build.dir" value="build" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="jar.dir" value="${build.dir}/jar" />
<property name="doc.dir" value="doc" />
<!-- setting up our classpath -->
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar" />
</path>
<!-- default main class for wikidump project -->
<property name="main-class" value="mw.wikidump.MakeLuceneIndex"/>
<!-- rule for cleaning project -->
<target name="clean" description="Cleans project class files and jars generated">
<delete dir="${build.dir}" />
</target>
<!-- rule building project (mainly generating classes files) -->
<target name="compile" description="compiles the project">
<mkdir dir="${classes.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" includeantruntime="false"/>
</target>
<!-- rule for building library -->
<target name="jar" depends="compile" description="generates a jar file with all classes">
<mkdir dir="${jar.dir}" />
<jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
</jar>
</target>
<!-- rule for running application -->
<target name="run">
<java fork="true" classname="${main-class}">
<classpath>
<path refid="classpath" />
<path location="${jar.dir}/${ant.project.name}.jar"/>
</classpath>
</java>
</target>
<!-- rule for creating html javadoc -->
<target name="doc">
<javadoc
access="public"
destdir="${doc.dir}"
author="false"
windowtitle="Wikidump API Documentation"
>
<link href="http://download.oracle.com/javase/6/docs/api/"/>
<fileset dir="${src.dir}" defaultexcludes="yes">
<include name="**/*.java"/>
</fileset>
</javadoc>
</target>
<!-- default ant rule -->
<target name="main" depends="clean, jar" >
</target>
</project>