File: build.xml

package info (click to toggle)
boilerpipe 1.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 520 kB
  • sloc: java: 4,298; xml: 187; makefile: 8
file content (193 lines) | stat: -rw-r--r-- 6,778 bytes parent folder | download | duplicates (2)
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<!--
    boilerpipe

    Copyright (c) 2009-2011 Christian Kohlschütter

    The author licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<project name="boilerpipe" default="dist" basedir=".">
	
	<property name="app.name" value="boilerpipe" />
	<property name="app.title" value="boilerpipe content extractor" />
	<property name="app.version" value="1.2.0" />
    <property name="javadoc.version" value="1.2" />
	<property name="app.javaversion" value="1.5" />
	<property name="app.dir" value="." />

	<property name="compile.debug" value="on" />
	<property name="compile.deprecation" value="false" />
	<property name="compile.optimize" value="true" />

	<target name="describe">
		<information>
			<name>${app.name}</name>
			<description>${app.title}</description>
			<version>${app.version}</version>
			<vendor>
			</vendor>
			<api>yes</api>
			<documents>no</documents>
			<begin>
			</begin>
			<end>
			</end>
			<author>
				Christian Kohlschütter
			</author>
			<state>
			</state>
		</information>
	</target>

	<property name="build.dir" value="${app.dir}/build" />

	<property name="build.main" value="${build.dir}/main" />
	<property name="build.demo" value="${build.dir}/demo" />
    <property name="lib.dir" value="${app.dir}/lib" />
	<property name="src.main" value="${app.dir}/src/main" />
	<property name="src.demo" value="${app.dir}/src/demo" />
	<property name="dist.dir" value="${app.dir}/dist" />
	<property name="jar.main" value="${dist.dir}/${app.name}-${app.version}.jar" />
	<property name="jar.demo" value="${dist.dir}/${app.name}-demo-${app.version}.jar" />
	<property name="jar.javadoc" value="${dist.dir}/${app.name}-javadoc-${app.version}.jar" />
	<property name="jar.sources" value="${dist.dir}/${app.name}-sources-${app.version}.jar" />
	<property name="javadoc.dir" value="${app.dir}/javadoc/${javadoc.version}/" />
	<property name="distBin.tar.gz" value="${dist.dir}/${app.name}-${app.version}-bin.tar.gz" />
	<property name="distSrc.tar.gz" value="${dist.dir}/${app.name}-${app.version}-src.tar.gz" />

   <path id="classpath.libs">
        <fileset dir="${lib.dir}">
            <include name="**/*.jar" />
        </fileset>
    </path>

	<path id="classpath.main">
		<dirset dir="${build.dir}">
			<include name="main" />
		</dirset>
	   <path refid="classpath.libs" />
	</path>

	<target name="init">
		<delete dir="${build.dir}" />
        <mkdir dir="${build.dir}" />
		<mkdir dir="${build.main}" />
		<mkdir dir="${build.demo}" />
		<mkdir dir="${dist.dir}" />
        <mkdir dir="${app.dir}/javadoc" />
        <mkdir dir="${javadoc.dir}" />
	</target>

	<target name="compile">
		<javac srcdir="${src.main}" destdir="${build.main}" encoding="UTF-8" source="${app.javaversion}" target="${app.javaversion}" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" classpathref="classpath.libs" />
		<javac srcdir="${src.demo}" destdir="${build.demo}" encoding="UTF-8" source="${app.javaversion}" target="${app.javaversion}" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" classpathref="classpath.main" />
	</target>

	<target name="clean">
		<delete dir="${build.dir}" />
        <delete dir="${dist.dir}" />
        <mkdir dir="${javadoc.dir}" />
        <delete>
            <fileset dir="${javadoc.dir}">
                <include name="**/*.html" />
                <include name="**/*.gif" />
                <include name="**/*.css" />
                <include name="**/*.png" />
                <exclude name="**/.svn/**" />
            </fileset>
        </delete>
	</target>

	<target name="javadoc">
		<javadoc destdir="${javadoc.dir}" version="true" use="true" windowtitle="${javadoc.version} API" classpathref="classpath.main" >
			<packageset dir="${src.main}" defaultexcludes="yes">
				<include name="de/l3s/**" />
			</packageset>
			<!--
			<packageset dir="${src.demo}" defaultexcludes="yes">
				<include name="de/l3s/**" />
			</packageset>
			-->
		</javadoc>
		<replaceregexp>
			<regexp pattern="&lt;!-- Generated by javadoc .*?--&gt;" />
			<substitution expression=""/>
			<fileset dir="${javadoc.dir}">
			 <include name="**/*.html" />
			</fileset>
		</replaceregexp>
        <replaceregexp>
            <regexp pattern="&lt;META NAME=&quot;date&quot;.*?&gt;" />
            <substitution expression="&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html;charset=utf-8&quot;"/>
            <fileset dir="${javadoc.dir}">
             <include name="**/*.html" />
            </fileset>
        </replaceregexp>
	</target>

	<target name="jars" depends="init,compile" description="Makes a distributable jar">

		<jar destfile="${jar.main}">
			<fileset dir="${build.main}">
				<include name="**/*" />
			</fileset>
		</jar>
		<jar destfile="${jar.demo}">
			<fileset dir="${build.demo}">
				<include name="**/*" />
			</fileset>
			<fileset dir="${src.demo}">
				<include name="**/*" />
			</fileset>
		</jar>
		<jar destfile="${jar.javadoc}">
			<fileset dir="${javadoc.dir}">
				<include name="**/*" />
			</fileset>
		</jar>
		<jar destfile="${jar.sources}">
			<fileset dir="${src.main}">
				<include name="**/*" />
			</fileset>
			<fileset dir="${src.demo}">
				<include name="**/*" />
			</fileset>
		</jar>
	</target>

	<target name="dist" depends="clean,init,javadoc,jars">
		<tar destfile="${distBin.tar.gz}" compression="gzip">
			<tarfileset dir="${app.dir}" prefix="${app.name}-${app.version}/">
				<include name="README.txt" />
                <include name="NOTICE.txt" />
				<include name="LICENSE.txt" />
				<include name="javadoc/**" />
                <include name="lib/**" />
			</tarfileset>
			<tarfileset dir="${dist.dir}" prefix="${app.name}-${app.version}/">
			    <include name="*.jar" />
			</tarfileset>
		</tar>
		<tar destfile="${distSrc.tar.gz}" compression="gzip">
			<tarfileset dir="." prefix="${app.name}-${app.version}/">
				<include name="README.txt" />
                <include name="NOTICE.txt" />
				<include name="LICENSE.txt" />
                <include name=".project" />
                <include name=".classpath" />
				<include name="src/**" />
				<include name="build.xml" />
			</tarfileset>
		</tar>
	</target>
</project>