-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
141 lines (122 loc) · 3.83 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
<?xml version="1.0"?>
<project name="pdfrpt" basedir="." default="help">
<!--**********-->
<!--PROPERTIES-->
<!--**********-->
<!--Properties: arbitrary environment prefix:-->
<property environment="env"/>
<property file="build.properties"/>
<!--Properties: directories:-->
<property name="java.dir" value="java"/>
<property name="build.dir" value="build"/>
<property name="dist.dir" value="dist"/>
<property name="lib.dir" value="lib"/>
<property name="appname" value="pdfrpt"/>
<property name="appname.version" value="${appname}.${VERSION.PDFRPT}"/>
<path id="classpath">
<fileset dir="${lib.dir}" includes="*.jar"/>
</path>
<!--**************-->
<!--TARGETS: HELP -->
<!--**************-->
<target name="help">
<echo>
clean:
Deletes all generated classes etc.
compile:
Compile all Java files to ./build
jar:
Compiles and creates a dist/${appname}.jar file from contents of ./build
javadoc:
Creates javadoc in ./javadoc
</echo>
</target>
<!--****************-->
<!--TARGETS: CLEAN -->
<!--****************-->
<target name="clean" description="Clean output directories">
<delete dir="javadoc"/>
<delete dir ="${build.dir}"/>
<delete dir ="${dist.dir}"/>
<delete dir="web/WEB-INF/classes/org"/>
<delete file="${appname}.jar"/>
<delete>
<fileset dir="." includes="*.pdf"/>
</delete>
</target>
<!--****************-->
<!--TARGETS: BUILD-->
<!--****************-->
<target name="compile" description="Compile main source tree java files">
<mkdir dir="${build.dir}"/>
<javac destdir="${build.dir}"
debug="true"
deprecation="true"
failonerror="true">
<src path="${java.dir}"/>
<classpath refid="classpath"/>
<compilerarg value="-Xlint:all"/>
<compilerarg value="-Xlint:-processing"/>
<compilerarg value="-Xlint:-serial"/>
<compilerarg value="-Werror"/>
</javac>
</target>
<target name="javadoc" description="JavaDoc">
<mkdir dir="javadoc"/>
<javadoc sourcepath="java" access="public" destdir="javadoc"
packagenames="org.**,com.**"
additionalparam="-Xdoclint:html">
<classpath refid="classpath"/>
<fileset dir="java">
<include name="**/*.java"/>
</fileset>
</javadoc>
</target>
<target name="jar" depends="compile">
<mkdir dir ="${dist.dir}"/>
<jar basedir="./build" destfile="dist/${appname.version}.jar"/>
</target>
<!-- ********************* -->
<!-- TARGETS: DISTRIBUTION -->
<!-- ********************* -->
<target name="dist" depends="dist.src,dist.bin,dist.site">
<echo>
Binary files in
</echo>
</target>
<target name="dist.site" depends="dist.src,dist.bin">
<mkdir dir="${dist.dir}/site/"/>
<copy todir="${dist.dir}/site/javadoc">
<fileset dir="javadoc"/>
</copy>
<copy todir="${dist.dir}/site">
<fileset dir="${dist.dir}">
<include name="*.zip"/>
</fileset>
</copy>
<copy todir="${dist.dir}/site" file="license.html"/>
<copy todir="${dist.dir}/site" file="build.properties"/>
</target>
<target name="dist.bin" depends="jar,javadoc">
<mkdir dir ="${dist.dir}/bin"/>
<copy todir="${dist.dir}/bin/javadoc/">
<fileset dir="javadoc/"/>
</copy>
<copy todir="${dist.dir}/bin">
<fileset dir="dist" includes="*.jar"/>
<fileset dir="lib" includes="*.jar,*.zip"/>
</copy>
<zip destfile="${dist.dir}/${appname.version}.zip">
<zipfileset dir="${dist.dir}/bin" prefix="${appname.version}"/>
</zip>
</target>
<target name="dist.src" depends="clean">
<!--
<mkdir dir ="${dist.dir}"/>
<zip destfile="dist/${appname.version}.src.zip">
<zipfileset dir="." prefix="${appname.version}.src"
excludes=".git/**/*,.git"/>
</zip>
-->
</target>
</project>