ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Spiffy/build.xml
Revision: 147
Committed: 2004-04-10T13:28:38-07:00 (15 years, 9 months ago) by Douglas Thrift
File size: 4160 byte(s)
Log Message:
Blah!

Line File contents
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!-- $Id$ -->
3 <project name="Spiffy" default="compile" basedir=".">
4
5 <property file="build.properties" />
6 <property file="${user.home}/build.properties" />
7
8 <property name="app.name" value="spiffy" />
9 <property name="app.path" value="/${app.name}" />
10 <property name="app.version" value="0.1-dev" />
11 <property name="build.home" value="${basedir}/build" />
12 <property name="catalina.home" value="/usr/local/jakarta-tomcat5.0" />
13 <property name="dist.home" value="${basedir}/dist" />
14 <property name="docs.home" value="${basedir}/docs" />
15 <property name="manager.url" value="http://localhost:8180/manager" />
16 <property name="src.home" value="${basedir}/src" />
17 <property name="web.home" value="${basedir}/web" />
18
19 <taskdef name="install" classname="org.apache.catalina.ant.InstallTask" />
20 <taskdef name="list" classname="org.apache.catalina.ant.ListTask" />
21 <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask" />
22 <taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask" />
23
24 <property name="compile.debug" value="true" />
25 <property name="compile.deprecation" value="false" />
26 <property name="compile.optimize" value="true" />
27
28 <path id="compile.classpath">
29 <pathelement location="${catalina.home}/common/classes" />
30 <fileset dir="${catalina.home}/common/endorsed">
31 <include name="*.jar" />
32 </fileset>
33 <fileset dir="${catalina.home}/common/lib">
34 <include name="*.jar" />
35 </fileset>
36 <pathelement location="${catalina.home}/shared/classes" />
37 <fileset dir="${catalina.home}/shared/lib">
38 <include name="*.jar" />
39 </fileset>
40 </path>
41
42 <target name="all" depends="clean,compile"
43 description="Clean build and dist directories, then compile" />
44
45 <target name="clean" description="Delete old build and dist directories">
46 <delete dir="${build.home}" />
47 <delete dir="${dist.home}" />
48 </target>
49
50 <target name="compile" depends="prepare"
51 description="Compile Java sources">
52 <mkdir dir="${build.home}/WEB-INF/classes" />
53 <javac srcdir="${src.home}" destdir="${build.home}/WEB-INF/classes"
54 debug="${compile.debug}" deprecation="${compile.deprecation}"
55 optimize="${compile.optimize}">
56 <classpath refid="compile.classpath" />
57 </javac>
58 <copy todir="${build.home}/WEB-INF/classes">
59 <fileset dir="${src.home}" excludes="**/*.java" />
60 </copy>
61 </target>
62
63 <target name="dist" depends="compile,javadoc"
64 description="Create binary distribution">
65 <mkdir dir="${dist.home}/docs" />
66 <copy todir="${dist.home}/docs">
67 <fileset dir="${docs.home}" />
68 </copy>
69 <jar jarfile="${dist.home}/${app.name}-${app.version}.war"
70 basedir="${build.home}" />
71 </target>
72
73 <target name="install" depends="compile"
74 description="Install application to servlet container">
75 <install url="${manager.url}" username="${manager.username}"
76 password="${manager.password}" path="${app.path}"
77 war="file://${build.home}" />
78 </target>
79
80 <target name="javadoc" depends="compile"
81 description="Create Javadoc API documentation">
82 <mkdir dir="${dist.home}/docs/api" />
83 <javadoc sourcepath="${src.home}" destdir="${dist.home}/docs/api"
84 packagenames="*">
85 <classpath refid="compile.classpath" />
86 </javadoc>
87 </target>
88
89 <target name="list"
90 description="List installed applications on servlet container">
91 <list url="${manager.url}" username="${manager.username}"
92 password="${manager.password}" />
93 </target>
94
95 <target name="prepare">
96 <mkdir dir="${build.home}" />
97 <mkdir dir="${build.home}/WEB-INF" />
98 <mkdir dir="${build.home}/WEB-INF/classes" />
99 <copy todir="${build.home}">
100 <fileset dir="${web.home}" />
101 </copy>
102 <mkdir dir="${build.home}/WEB-INF/lib" />
103 </target>
104
105 <target name="reload" depends="compile"
106 description="Reload application on servlet container">
107
108 <reload url="${manager.url}" username="${manager.username}"
109 password="${manager.password}" path="${app.path}"/>
110 </target>
111
112 <target name="remove"
113 description="Remove application on servlet container">
114 <remove url="${manager.url}" username="${manager.username}"
115 password="${manager.password}" path="${app.path}"/>
116 </target>
117
118 </project>

Properties

Name Value
svn:eol-style native
svn:keywords Id