This repository has been archived by the owner on Sep 21, 2021. It is now read-only.
forked from sonarme/luke
-
Notifications
You must be signed in to change notification settings - Fork 352
/
build.xml
152 lines (146 loc) · 4.89 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
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF 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="Luke" default="dist">
<defaultexcludes add="**/CVS"/>
<property name="build.dir" value="build"/>
<property name="build.ver" value="4.0.0-BETA"/>
<property name="dist.dir" value="dist"/>
<property name="jarfile" value="${build.dir}/luke-${build.ver}.jar"/>
<property name="jarallfile" value="${build.dir}/lukeall-${build.ver}.jar"/>
<property name="jarminfile" value="${build.dir}/lukemin-${build.ver}.jar"/>
<property name="srczip" value="${dist.dir}/luke-src-${build.ver}.zip"/>
<property name="srctgz" value="${dist.dir}/luke-src-${build.ver}.tgz"/>
<target name="init">
<tstamp/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="compile" depends="init">
<javac classpath="${classpath}"
sourcepath=""
source="1.5"
target="1.5"
srcdir="src"
debug="on"
destdir="${build.dir}">
<classpath>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
<include name="**/*.java" />
</javac>
</target>
<target name="javadoc" depends="init">
<javadoc sourcepath="src" packagenames="org.*" destdir="${build.dir}/api">
<classpath>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javadoc>
</target>
<target depends="compile" name="jar">
<copy todir="${build.dir}">
<fileset dir="src/">
<include name="**/*.gif"/>
<include name="**/*.png"/>
<include name="**/*.xml"/>
<include name="**/*.js"/>
<include name=".plugins"/>
</fileset>
</copy>
<jar basedir="${build.dir}"
jarfile="${jarfile}"
includes="img/,org/,thinlet/,xml/"
excludes="org/getopt/luke/plugins,**/*.js,**/Thumbs.db">
<manifest>
<attribute name="Main-Class" value="org.getopt.luke.Luke"/>
<attribute name="Classpath" value="lucene-core-4.0.0-BETA.jar;js.jar;lucene-misc-4.0.0-BETA.jar"/>
</manifest>
</jar>
<unjar dest="${build.dir}">
<fileset dir="lib" includes="lucene-*.jar"/>
</unjar>
<jar basedir="${build.dir}"
jarfile="${jarminfile}"
includes=".plugins,img/,org/,thinlet/,xml/"
excludes="org/mozilla/,org/getopt/luke/plugins,**/*.js">
<manifest>
<attribute name="Main-Class" value="org.getopt.luke.Luke"/>
<attribute name="Classpath" value="lucene-core-4.0.0-BETA.jar;lucene-misc-4.0.0-BETA.jar"/>
</manifest>
</jar>
<unjar dest="${build.dir}">
<fileset dir="lib" includes="js.jar"/>
<fileset dir="lib" includes="lucene*.jar"/>
</unjar>
<unjar dest="${build.dir}">
<fileset dir="lib" includes="hadoop/*.jar"/>
</unjar>
<unjar dest="${build.dir}">
<fileset dir="lib" includes="solr/*.jar"/>
</unjar>
<unjar dest="${build.dir}">
<fileset dir="lib" includes="lucene-core-*.jar"/>
<patternset>
<include name="META-INF/**"/>
</patternset>
</unjar>
<manifest file="${build.dir}/META-INF/MANIFEST.MF" mode="update">
<attribute name="Main-Class" value="org.getopt.luke.Luke"/>
</manifest>
<jar basedir="${build.dir}"
jarfile="${jarallfile}"
manifest="${build.dir}/META-INF/MANIFEST.MF"
includes=".plugins,img/,net/,com/,org/,thinlet/,xml/,**/*.properties,**/*.xml" >
<metainf dir="${build.dir}/META-INF" includes="*/**"/>
</jar>
</target>
<target name="dist" depends="clean,jar">
<fileset dir=".">
<patternset id="distfiles">
<exclude name="eclipse/**"/>
<exclude name="extras/**"/>
<exclude name="sandbox/**"/>
<exclude name="index/**"/>
<exclude name="${build.dir}/**"/>
<exclude name="${dist.dir}/**"/>
</patternset>
</fileset>
<copy todir="${dist.dir}">
<fileset dir="lib"/>
<fileset file="${jarfile}"/>
<fileset file="${jarallfile}"/>
<fileset file="${jarminfile}"/>
</copy>
<zip destfile="${srczip}">
<zipfileset dir="." prefix="luke-${build.ver}">
<patternset refid="distfiles"/>
</zipfileset>
</zip>
<tar compression="gzip" destfile="${srctgz}">
<tarfileset dir="." prefix="luke-${build.ver}">
<patternset refid="distfiles"/>
</tarfileset>
</tar>
</target>
</project>