-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
160 lines (154 loc) · 5.18 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<?xml version="1.0"?>
<project name="Linenoise4Java" default="jar" basedir=".">
<property file="build.properties" />
<property environment="env"/>
<path id="base.classpath">
<fileset dir="${lib.dir}" includes="*.jar" />
<pathelement location="${src.build.dir}" />
<pathelement location="${test.build.dir}" />
<pathelement location="${example.build.dir}" />
</path>
<target name="clean">
<delete failonerror="false">
<fileset dir="${build.dir}"/>
<fileset dir="${dist.dir}/${project.version}"/>
<fileset dir="${doc.dir}"/>
</delete>
</target>
<target name="prepare">
<mkdir dir="${build.dir}" />
<mkdir dir="${src.build.dir}" />
<mkdir dir="${src.build.dir}/META-INF" />
<mkdir dir="${test.build.dir}" />
<mkdir dir="${test.build.dir}/META-INF" />
<mkdir dir="${example.build.dir}" />
<mkdir dir="${example.build.dir}/META-INF" />
<mkdir dir="${dist.dir}/${project.version}" />
<mkdir dir="${doc.dir}"/>
</target>
<target name="compile-java" depends="clean, prepare">
<javac
srcdir="${src.dir}"
destdir="${src.build.dir}"
classpathref = "base.classpath"
debug="${javac.debug}"
target="${javac.target}"
deprecation="${javac.deprecation}"
optimize="${javac.optimize}"
excludes="${javac.excludes}"
encoding="${project.encoding}" >
<compilerarg value="-Xlint:unchecked"/>
</javac>
<javac
srcdir="${test.dir}"
destdir="${test.build.dir}"
classpathref = "base.classpath"
debug="${javac.debug}"
target="${javac.target}"
deprecation="${javac.deprecation}"
optimize="${javac.optimize}"
excludes="${javac.excludes}"
encoding="${project.encoding}" >
<compilerarg value="-Xlint:unchecked"/>
</javac>
<javac
srcdir="${example.dir}"
destdir="${example.build.dir}"
classpathref = "base.classpath"
debug="${javac.debug}"
target="${javac.target}"
deprecation="${javac.deprecation}"
optimize="${javac.optimize}"
excludes="${javac.excludes}"
encoding="${project.encoding}" >
<compilerarg value="-Xlint:unchecked"/>
</javac>
</target>
<target name="generate-doc" depends="clean, prepare">
<javadoc destdir="${doc.dir}" encoding="${project.encoding}" docencoding="${project.encoding}">
<packageset dir="${src.dir}">
<include name="**"/>
</packageset>
</javadoc>
</target>
<target name="jar" depends="compile-java, generate-doc">
<jar jarfile="${dist.dir}/${project.version}/${project.name}-${project.version}.jar">
<fileset dir="${src.build.dir}">
<include name="**/*" />
</fileset>
<manifest>
<attribute name="Manifest-Version" value="1.0"/>
<attribute name="Built-By" value="zhengbo.wang"/>
<attribute name="Email" value="[email protected]"/>
</manifest>
</jar>
<jar jarfile="${dist.dir}/${project.version}/${project.name}-${project.version}-lib.jar">
<fileset dir="${src.dir}">
<include name="**/*.dll" />
<include name="**/*.so" />
<include name="**/*.dylib" />
</fileset>
<manifest>
<attribute name="Manifest-Version" value="1.0"/>
<attribute name="Built-By" value="zhengbo.wang"/>
<attribute name="Email" value="[email protected]"/>
</manifest>
</jar>
<jar jarfile="${dist.dir}/${project.version}/${project.name}-${project.version}-test.jar">
<fileset dir="${test.build.dir}">
<include name="**/*" />
</fileset>
<manifest>
<attribute name="Manifest-Version" value="1.0"/>
<attribute name="Built-By" value="zhengbo.wang"/>
<attribute name="Email" value="[email protected]"/>
</manifest>
</jar>
<jar jarfile="${dist.dir}/${project.version}/${project.name}-${project.version}-example.jar">
<fileset dir="${example.build.dir}">
<include name="**/*" />
</fileset>
<manifest>
<attribute name="Manifest-Version" value="1.0"/>
<attribute name="Built-By" value="zhengbo.wang"/>
<attribute name="Email" value="[email protected]"/>
</manifest>
</jar>
<jar jarfile="${dist.dir}/${project.version}/${project.name}-${project.version}-javadoc.jar">
<fileset dir="${doc.dir}">
<include name="**/*" />
</fileset>
</jar>
<jar jarfile="${dist.dir}/${project.version}/${project.name}-${project.version}-all.jar">
<fileset dir=".">
<include name="${src.dir}/**" />
</fileset>
<fileset dir=".">
<include name="${test.dir}/**" />
</fileset>
<fileset dir=".">
<include name="${example.dir}/**" />
</fileset>
<fileset dir=".">
<include name="${lib.dir}/**" />
</fileset>
<fileset dir=".">
<include name="${dist.dir}/${project.version}/**" />
</fileset>
<fileset dir=".">
<include name=".classpath" />
<include name=".project" />
<include name="ChangeLog.txt" />
<include name="Linenoise4Java-License.txt" />
<include name="build.bat" />
<include name="build.properties" />
<include name="build.xml" />
<include name="readme.txt" />
<include name="runExample.bat" />
<include name="runExample.sh" />
<include name="runTest.bat" />
<include name="runTest.sh" />
</fileset>
</jar>
</target>
</project>