forked from aseldawy/MNTG
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
executable file
·81 lines (69 loc) · 2.81 KB
/
Copy pathbuild.xml
File metadata and controls
executable file
·81 lines (69 loc) · 2.81 KB
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="idea-stHadoop" default="main" basedir=".">
<!-- Sets variables which can later be used. -->
<!-- The value of a property is accessed via ${} -->
<property name="src.dir" location="src" />
<property name="build.dir" location="bin" />
<property name="dist.dir" location="dist" />
<property name="docs.dir" location="docs" />
<property name="lib.dir" location="lib" />
<property name="bin.dir" location="bin" />
<property name="version" value="1" />
<property name="projectName" value="idea-stHadoop" />
<property name="ant.build.javac.source" value="1.7" />
<property name="ant.build.javac.target" value="1.7" />
<property name="main.class" value="org.umn.sthadoop.Main" />
<!--
Create a classpath container which can be later used in the ant task
-->
<path id="build.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<!-- Deletes the existing build, docs and dist directory-->
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${bin.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${bin.dir}" />
</target>
<!-- Creates the build, docs and dist directory-->
<target name="makedir">
<mkdir dir="${build.dir}" />
<mkdir dir="${dist.dir}" />
<mkdir dir="${bin.dir}" />
</target>
<!-- Compiles the java code (including the usage of library for JUnit -->
<target name="compile" depends="clean, makedir">
<javac verbose="false" debug="true" includeantruntime="false" srcdir="${src.dir}" destdir="${build.dir}" classpathref="build.classpath" target="${ant.build.javac.target}" source="${ant.build.javac.source}">
</javac>
</target>
<!-- Creates Javadoc -->
<target name="docs" depends="compile">
<javadoc packagenames="src" sourcepath="${src.dir}" destdir="${docs.dir}">
<!-- Define which files / directory should get included, we include all -->
<fileset dir="${src.dir}">
<include name="**" />
</fileset>
</javadoc>
</target>
<!--Creates the deployable jar file -->
<target name="jar" depends="compile" description="Create one big jarfile.">
<jar jarfile="${dist.dir}/${projectName}-${version}.jar">
<zipgroupfileset dir="${lib.dir}">
<include name="**/*.jar" />
</zipgroupfileset>
</jar>
<sleep seconds="1" />
<jar jarfile="${dist.dir}/${projectName}-${version}-withlib.jar" basedir="${build.dir}" >
<zipfileset src="${dist.dir}/${projectName}-${version}.jar" excludes="META-INF/*.SF" />
<manifest>
<attribute name="Main-Class" value="${main.class}" />
</manifest>
</jar>
</target>
<target name="main" depends="compile, jar">
<description>Main target</description>
</target>
</project>