-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
executable file
·95 lines (80 loc) · 3.49 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
<project name="CompactBeans" default="dist" basedir=".">
<description>Ant build file for CompactBeans</description>
<!-- set global properties for this build -->
<property file="build.properties" />
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="doc" location="docs"/>
<property name="dist" location="dist"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${doc}"/>
</target>
<target name="compile" depends="init"
description="compile the source">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" source="1.8" target="1.8"
includeAntRuntime="false">
<compilerarg line="-profile compact1"/>
</javac>
</target>
<target name="javadoc" depends="init"
description="build the javadoc">
<mkdir dir="${doc}/api" />
<javadoc sourcepath="${src}" destdir="${doc}/api"
windowtitle="CompactBeans API ${version}"
author="false" version="false">
<tag name="jdksource" scope="types" description="OpenJDK Source:"/>
</javadoc>
</target>
<target name="dist" depends="compile, javadoc"
description="generate the distribution files">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
<!-- Put everything in ${build} into the dist/lib directory -->
<jar jarfile="${dist}/lib/compactbeans-${version}.jar" basedir="${build}"/>
<zip destfile="${dist}/lib/compactbeans-javadoc-${version}.zip" basedir="${doc}"/>
</target>
<target name="release" depends="clean, dist"
description="build the release files">
<patternset id="redistributables">
<include name="src/**" />
<include name="dist/**" />
<include name="docs/**" />
<include name="*.properties" />
<include name="*.xml" />
<include name="*.md" />
<include name="LICENSE" />
<include name="ASSEMBLY_EXCEPTION" />
</patternset>
<zip destfile="../compactbeans-${version}.zip">
<fileset dir=".">
<patternset refid="redistributables" />
</fileset>
</zip>
<tar destfile="../compactbeans-${version}.tar">
<fileset dir=".">
<patternset refid="redistributables" />
</fileset>
</tar>
<gzip src="../compactbeans-${version}.tar"
destfile="../compactbeans-${version}.tar.gz" />
<bzip2 src="../compactbeans-${version}.tar"
destfile="../compactbeans-${version}.tar.bz2" />
<delete file="../compactbeans-${version}.tar" />
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build}, ${doc}, and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${doc}"/>
<delete dir="${dist}"/>
<delete file="../compactbeans-${version}.zip" />
<delete file="../compactbeans-${version}.tar" />
<delete file="../compactbeans-${version}.tar.gz" />
<delete file="../compactbeans-${version}.tar.bz2" />
</target>
</project>