123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279 |
- <?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>
- <jar jarfile="${client.dir}/contacts.jar">
- <fileset dir="${build.dir}">
- <include name="sample/contact/Contact.class"/>
- <include name="sample/contact/ContactManager.class"/>
- <include name="sample/contact/ClientApplication.class"/>
- </fileset>
- </jar>
- </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 dir="${tmp.dir}"/>
-
- <!-- Make WAR suitable for deployment into containers WITHOUT container adapters -->
- <delete file="${dist.dir}/${name.filter}.war"/>
- <mkdir dir="${tmp.dir}/${name.filter}"/>
- <copy todir="${tmp.dir}/${name.filter}">
- <fileset dir="${war.dir}">
- <include name="**"/>
- </fileset>
- <fileset dir="${etc.dir}/filter">
- <include name="acegilogin.jsp"/>
- </fileset>
- </copy>
- <copy todir="${tmp.dir}/${name.filter}/classes">
- <fileset dir="${build.dir}">
- <include name="**"/>
- </fileset>
- </copy>
- <copy todir="${tmp.dir}/${name.filter}/WEB-INF">
- <fileset dir="${etc.dir}/filter">
- <include name="web.xml"/>
- <include name="applicationContext.xml"/>
- </fileset>
- </copy>
- <war warfile="${dist.dir}/${name.filter}.war" webxml="${tmp.dir}/${name.filter}/WEB-INF/web.xml">
- <!-- Include the files which are not under WEB-INF -->
- <fileset dir="${tmp.dir}/${name.filter}">
- <exclude name="WEB-INF/**"/>
- <exclude name="classes/**"/>
- </fileset>
- <!-- Bring in various XML configuration files -->
- <webinf dir="${tmp.dir}/${name.filter}/WEB-INF">
- <exclude name="web.xml"/>
- </webinf>
- <!-- Include the compiled classes -->
- <classes dir="${tmp.dir}/${name.filter}/classes"/>
- <!-- Include required libraries -->
- <lib dir="${lib.dir}/jakarta-taglibs" includes="*.jar"/>
- <lib dir="${lib.dir}/spring" includes="spring.jar"/>
- <lib dir="${lib.dir}/aopalliance" includes="aopalliance-*.jar"/>
- <lib dir="${lib.dir}/regexp" includes="jakarta-oro.jar"/>
- <lib dir="${lib.dir}/j2ee" includes="jstl.jar"/>
- <lib dir="${lib.dir}/caucho" includes="*.jar"/>
- <lib dir="${lib.dir}/jakarta-commons" includes="commons-codec.jar"/>
- <lib dir="${lib.dir}/jakarta-commons" includes="commons-collections.jar"/>
- <lib dir="${lib.dir}/ehcache" includes="*.jar"/>
- <lib dir="${dist.lib.dir}" includes="acegi-security-taglib.jar"/>
- <lib dir="${dist.lib.dir}" includes="acegi-security.jar"/>
- </war>
- <!-- Make WAR suitable for deployment into containers using JA-SIG CAS -->
- <delete file="${dist.dir}/${name.cas}.war"/>
- <mkdir dir="${tmp.dir}/${name.cas}"/>
- <copy todir="${tmp.dir}/${name.cas}">
- <fileset dir="${war.dir}">
- <include name="**"/>
- </fileset>
- <fileset dir="${etc.dir}/cas">
- <include name="casfailed.jsp"/>
- </fileset>
- </copy>
- <copy todir="${tmp.dir}/${name.cas}/classes">
- <fileset dir="${build.dir}">
- <include name="**"/>
- </fileset>
- </copy>
- <copy todir="${tmp.dir}/${name.cas}/WEB-INF">
- <fileset dir="${etc.dir}/cas">
- <include name="web.xml"/>
- <include name="applicationContext.xml"/>
- </fileset>
- </copy>
- <war warfile="${dist.dir}/${name.cas}.war" webxml="${tmp.dir}/${name.cas}/WEB-INF/web.xml">
- <!-- Include the files which are not under WEB-INF -->
- <fileset dir="${tmp.dir}/${name.cas}">
- <exclude name="WEB-INF/**"/>
- <exclude name="classes/**"/>
- </fileset>
- <!-- Bring in various XML configuration files -->
- <webinf dir="${tmp.dir}/${name.cas}/WEB-INF">
- <exclude name="web.xml"/>
- </webinf>
- <!-- Include the compiled classes -->
- <classes dir="${tmp.dir}/${name.cas}/classes"/>
- <!-- Include required libraries -->
- <lib dir="${lib.dir}/jakarta-taglibs" includes="*.jar"/>
- <lib dir="${lib.dir}/spring" includes="spring.jar"/>
- <lib dir="${lib.dir}/aopalliance" includes="aopalliance-*.jar"/>
- <lib dir="${lib.dir}/regexp" includes="jakarta-oro.jar"/>
- <lib dir="${lib.dir}/j2ee" includes="jstl.jar"/>
- <lib dir="${lib.dir}/caucho" includes="*.jar"/>
- <lib dir="${lib.dir}/jakarta-commons" includes="commons-codec.jar"/>
- <lib dir="${lib.dir}/jakarta-commons" includes="commons-collections.jar"/>
- <lib dir="${lib.dir}/cas" includes="*.jar"/>
- <lib dir="${lib.dir}/ehcache" includes="ehcache.jar"/>
- <lib dir="${dist.lib.dir}" includes="acegi-security-taglib.jar"/>
- <lib dir="${dist.lib.dir}" includes="acegi-security.jar"/>
- </war>
- <!-- Make WAR suitable for deployment into containers WITH container adapters -->
- <delete file="${dist.dir}/${name.ca}.war"/>
- <mkdir dir="${tmp.dir}/${name.ca}"/>
- <copy todir="${tmp.dir}/${name.ca}">
- <fileset dir="${war.dir}">
- <include name="**"/>
- </fileset>
- <fileset dir="${etc.dir}/ca">
- <include name="login.jsp"/>
- </fileset>
- </copy>
- <copy todir="${tmp.dir}/${name.ca}/classes">
- <fileset dir="${build.dir}">
- <include name="**"/>
- </fileset>
- <fileset dir="${etc.dir}/ca">
- <include name="resin-acegisecurity.xml"/>
- </fileset>
- </copy>
- <copy todir="${tmp.dir}/${name.ca}/WEB-INF">
- <fileset dir="${etc.dir}/ca">
- <include name="jboss-web.xml"/>
- <include name="resin-web.xml"/>
- <include name="web.xml"/>
- <include name="applicationContext.xml"/>
- </fileset>
- </copy>
- <war warfile="${dist.dir}/${name.ca}.war" webxml="${tmp.dir}/${name.ca}/WEB-INF/web.xml">
- <!-- Include the files which are not under WEB-INF -->
- <fileset dir="${tmp.dir}/${name.ca}">
- <exclude name="WEB-INF/**"/>
- <exclude name="classes/**"/>
- </fileset>
- <!-- Bring in various XML configuration files -->
- <webinf dir="${tmp.dir}/${name.ca}/WEB-INF">
- <exclude name="web.xml"/>
- </webinf>
- <!-- Include the compiled classes -->
- <classes dir="${tmp.dir}/${name.ca}/classes"/>
- <!-- Include required libraries -->
- <lib dir="${lib.dir}/jakarta-taglibs" 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>
|