add --shared
[pylucene.git] / lucene-java-3.4.0 / lucene / contrib / xml-query-parser / build.xml
1 <?xml version="1.0"?>
2
3 <!--
4     Licensed to the Apache Software Foundation (ASF) under one or more
5     contributor license agreements.  See the NOTICE file distributed with
6     this work for additional information regarding copyright ownership.
7     The ASF licenses this file to You under the Apache License, Version 2.0
8     the "License"); you may not use this file except in compliance with
9     the License.  You may obtain a copy of the License at
10
11         http://www.apache.org/licenses/LICENSE-2.0
12
13     Unless required by applicable law or agreed to in writing, software
14     distributed under the License is distributed on an "AS IS" BASIS,
15     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16     See the License for the specific language governing permissions and
17     limitations under the License.
18  -->
19
20 <project name="xml-query-parser" default="default">
21
22   <description>
23     XML query parser
24   </description>
25
26   <import file="../contrib-build.xml"/>
27
28   <property name="servlet.jar" location="${common.dir}/lib/servlet-api-2.4.jar"/>
29   <available property="servlet.jar.present" type="file" file="${servlet.jar}"/>
30
31   <path id="classpath">
32     <pathelement path="${queries.jar}"/>
33     <path refid="base.classpath"/>
34   </path>
35
36   <path id="web-classpath">
37     <pathelement path="${queries.jar}"/>
38     <pathelement path="${servlet.jar}"/>
39     <pathelement path="${build.dir}/${final.name}.jar"/>
40     <path refid="base.classpath"/>
41   </path>
42
43   <target name="compile-core" depends="jar-queries,common.compile-core" />
44
45   <!-- override contrib-build.xml target to also build web demo -->
46   <target name="build-artifacts-and-tests" depends="jar, compile-test,build-web-demo" />
47
48   <target name="default" depends="jar-lucene-core,jar-core,build-web-demo"/>
49
50   <target name="build-web-demo"  description="Compiles demo" if="servlet.jar.present">
51
52     <echo>XML Parser compiling web demo</echo>
53
54     <compile
55       srcdir="src/demo/java"
56       destdir="${build.dir}/classes/webdemo">
57       <classpath refid="web-classpath"/>
58     </compile>
59
60     <war destfile="${build.dir}/xml-query-demo.war" webxml="src/demo/WebContent/WEB-INF/web.xml">
61       <fileset dir="src/demo/WebContent"/>
62       <lib dir="${build.dir}">
63         <include name="${final.name}.jar"/>
64       </lib>
65       <lib file="${queries.jar}"/>
66       <lib file="${lucene-core.jar}"/>
67       <classes dir="${build.dir}/classes/webdemo"/>
68     </war>
69
70   </target>
71 </project>