root/lucene-ws/trunk/build.xml

Revision 413, 2.8 kB (checked in by brian.cassidy, 1 year ago)

applying version, tabs and line ending changes from branch

Line 
1 <?xml version="1.0"?>
2 <project name="lucene-ws" default="all" basedir=".">
3
4     <property name="project.name"    value="lucene-ws" />
5     <property name="project.version" value="1.0_03" />
6
7     <import file="conf/${deploy}.xml" optional="true" />
8
9     <property name="package.filename" value="${basedir}/dist/${project.name}-${project.version}" />
10     <property name="package.war"      value="${package.filename}.war" />
11     <property name="package.source"   value="${package.filename}-src.tar.gz" />
12    
13     <property name="build.test"   value="testBuild" />
14    
15
16     <path id="lib.class.path">
17         <fileset dir="lib">
18             <include name="**/*.jar" />
19         </fileset>
20         <pathelement location="build" />
21     </path>
22    
23     <target name="all" depends="clean,prepare,compile,javadoc,package" />
24
25     <target name="clean">
26         <delete dir="build" />
27         <delete dir="dist" />
28     </target>
29
30     <target name="prepare">
31         <mkdir dir="build" />
32     </target>
33
34     <target name="compile" depends="prepare">
35         <javac srcdir="src" destdir="build" debug="on" optimize="off" deprecation="on">
36             <classpath>
37                 <path refid="lib.class.path" />
38             </classpath>
39         </javac>
40     </target>
41
42     <target name="javadoc" depends="compile">
43         <mkdir dir="dist/javadoc" />
44         <javadoc sourcepath="src" destdir="dist/javadoc" packagenames="*">
45             <classpath>
46                 <path refid="lib.class.path" />
47             </classpath>
48         </javadoc>
49     </target>
50
51     <target name="package" depends="compile">
52         <mkdir dir="dist" />
53         <war destfile="${package.war}" webxml="conf/web.xml">
54             <classes dir="build" />
55             <lib dir="lib">
56                 <exclude name="servlet-api-2.5-6.0.2.jar" />
57                 <exclude name="*junit*.jar" />
58             </lib>
59         </war>
60     </target>
61
62     <target name="package-source" depends="clean">
63         <mkdir dir="dist" />
64         <tar destfile="${package.source}" basedir="." excludes="dist/**" compression="gzip" />
65     </target>
66        
67    
68     <target name="test-compile" depends="compile">
69         <delete dir="${build.test}" />
70         <mkdir dir="${build.test}" />
71         <javac srcdir="test" destdir="${build.test}" debug="on" optimize="off" deprecation="on">
72              <classpath>
73                   <path refid="lib.class.path" />
74              </classpath>
75          </javac>
76     </target>
77    
78      <target name="test" depends="test-compile">
79          <junit>
80             <classpath>
81                 <path refid="lib.class.path" />
82                 <pathelement location="${build.test}" />
83             </classpath>
84           <formatter type="brief" usefile="false" />
85           <batchtest>
86             <fileset dir="${build.test}" includes="**/*Test*.class" />
87           </batchtest>
88         </junit>
89       </target>
90
91 </project>
Note: See TracBrowser for help on using the browser.