123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <?xml version="1.0"?>
- <!--
- * Copyright 2004 Acegi Technology Pty Limited
- *
- * Licensed 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.
- *
- *
- * $Id$
- -->
- <!--
- Build file for the "contacts" sample application.
- -->
- <project name="contacts-sample" basedir="." default="usage">
- <property file="build.properties"/>
- <property file="project.properties"/>
- <path id="qa-portalpath">
- <fileset dir="${dist.lib.dir}">
- <include name="acegi-security.jar"/>
- </fileset>
- <fileset dir="${lib.dir}">
- <include name="**/**.jar"/>
- </fileset>
- </path>
- <path id="jalopy-classpath">
- <fileset dir="${lib.dir}/jalopy">
- <include name="**/*.jar"/>
- </fileset>
- </path>
- <target name="usage">
- <echo message=""/>
- <echo message="Contacts sample application build file"/>
- <echo message="*** Make sure you've followed the instructions for your container in the reference documentation."/>
- <echo message="------------------------------------------------------"/>
- <echo message=""/>
- <echo message="Available targets are:"/>
- <echo message=""/>
- <echo message="clean --> Clean output dirs"/>
- <echo message="build --> Compile main Java sources and copy libraries"/>
- <echo message="warfile --> Create WAR deployment units"/>
- <echo message="javadoc --> Create API documentation"/>
- <echo message=""/>
- </target>
- <target name="clean" description="Clean output dirs (build, dist)">
- <delete dir="${build.dir}"/>
- <delete dir="${dist.dir}"/>
- <delete dir="${war.dir}/WEB-INF/lib"/>
- </target>
- <target name="build" description="Compile main source tree java files into class files">
- <mkdir dir="${build.dir}"/>
- <javac destdir="${build.dir}" target="1.3" debug="true" deprecation="false"
- optimize="false" failonerror="true">
- <src path="${src.dir}"/>
- <classpath refid="qa-portalpath"/>
- </javac>
- <copy todir="${build.dir}">
- <fileset dir="${src.dir}">
- <include name="*.properties"/>
- </fileset>
- </copy>
- </target>
- <target name="format" description="Formats all project source code">
- <taskdef name="jalopy" classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
- <classpath refid="jalopy-classpath"/>
- </taskdef>
- <jalopy fileformat="unix"
- convention="${jalopy.xml}"
- history="file"
- historymethod="adler32"
- loglevel="error"
- threads="2"
- classpathref="qa-portalpath">
- <fileset dir="${src.dir}">
- <include name="**/*.java"/>
- </fileset>
- </jalopy>
- </target>
- <target name="warfile" depends="build" description="Build the web application archives">
- <mkdir dir="${dist.dir}"/>
- <delete file="${dist.dir}/${name}.war"/>
- <war warfile="${dist.dir}/${name}.war" webxml="${war.dir}/WEB-INF/web.xml">
- <!-- Include the JSPs and other documents -->
- <fileset dir="war" excludes="WEB-INF/**"/>
- <!-- Bring in Spring-specific XML configuration files -->
- <webinf dir="${war.dir}/WEB-INF">
- <!-- We separately include these -->
- <exclude name="web.xml"/>
- </webinf>
- <!-- Include the compiled classes -->
- <classes dir="${build.dir}"/>
- <!-- Include required libraries -->
- <lib dir="${lib.dir}/jakarta-commons" includes="*.jar" excludes="*logging*"/>
- <lib dir="${lib.dir}/jakarta-taglibs" includes="*.jar"/>
- <lib dir="${lib.dir}/hsqldb" includes="*.jar"/>
- <lib dir="${lib.dir}/j2ee" includes="jstl.jar"/>
- <lib dir="${dist.lib.dir}" includes="acegi-security-taglib.jar"/>
- </war>
- </target>
- <target name="javadoc" description="Generate Javadocs.">
- <mkdir dir="${javadocs.dir}"/>
- <javadoc sourcepath="src" destdir="${javadocs.dir}" windowtitle="Contact Sample Application"
- defaultexcludes="yes" author="true" version="true" use="true">
- <doctitle><![CDATA[<h1>Acegi Security System for Spring Contacts Sample</h1>]]></doctitle>
- <bottom><![CDATA[<A HREF="http://acegisecurity.sourceforge.net">Acegi Security System for Spring Project]]></bottom>
- <classpath refid="qa-portalpath"/>
- <packageset dir="${src.dir}">
- <include name="sample/contact/**"/>
- </packageset>
- </javadoc>
- </target>
- <target name="release" depends="clean,warfile,javadoc" description="Builds a clean release file"/>
- </project>
|