1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
   | <project name="blank" basedir="../" default="all">
 
 
    <!-- Local system paths -->
    <property name="servlet.jar" value="../../common/lib/servlet-api.jar"/>
    <property name="distpath.project" value="dist"/>
 
 
    <!-- Project settings -->
    <property name="project.title" value="Apache Struts Blank "/>
    <property name="project.distname" value="blank"/>
    <property name="project.version" value="1.3"/>
 
 
    <!-- Path settings -->
    <property name="doc.path" value="./doc/api"/>
    <property name="doc.src" value="./src/java"/>
 
 
    <!-- classpath for Struts 1.3 -->
    <path id="compile.classpath">
        <pathelement path ="lib/commons-beanutils.jar"/>
        <pathelement path ="lib/commons-digester.jar"/>
        <pathelement path ="lib/struts.jar"/>
        <pathelement path ="${servlet.jar}"/>
        <pathelement path ="classes"/>
        <pathelement path ="${classpath}"/>
    </path>
 
 
    <!-- Check timestamp on files -->
    <target name="prepare">
        <tstamp/>
    </target>
 
 
    <!-- Copy any resource or configuration files -->
    <target name="resources">
        <copy todir="classes" includeEmptyDirs="no">
            <fileset dir="src/java">
            <patternset>
                <include name="**/*.conf"/>
                <include name="**/*.properties"/>
                <include name="**/*.xml"/>
            </patternset>
            </fileset>
        </copy>
    </target>
 
 
    <!-- Normal build of application -->
    <target name="compile" depends="prepare,resources">
        <javac srcdir="src/java" destdir="classes">
            <classpath refid="compile.classpath"/>
        </javac>
    </target>
 
 
    <!-- Remove classes directory for clean build -->
    <target name="clean"
      description="Prepare for clean build">
      <delete dir="classes"/>
      <mkdir  dir="classes"/>
    </target>
 
 
    <!-- Build Javadoc documentation -->
    <target name="javadoc"
     description="Generate JavaDoc API docs">
        <delete dir="./doc/api"/>
        <mkdir dir="./doc/api"/>
        <javadoc sourcepath="./src/java"
            destdir="./doc/api"
            classpath="${servlet.jar}"
            packagenames="*"
            author="false"
            private="true"
            version="true"
            windowtitle="${project.title} API Documentation"
            doctitle="<h1>${project.title} Documentation (Version ${project.version})</h1>"
            bottom="Copyright © 2002-2005">
            <classpath refid="compile.classpath"/>
        </javadoc>
    </target>
 
 
    <!-- Build entire project -->
    <target name="project" depends="clean,prepare,compile,javadoc"/>
 
 
    <!-- Create binary distribution -->
    <target name="dist"
        description="Create binary distribution">
 
      <mkdir
        dir="${distpath.project}"/>
      <jar
        jarfile="${distpath.project}/${project.distname}.jar"
        basedir="./classes"/>
      <copy
        file="${distpath.project}/${project.distname}.jar"
        todir="${distpath.project}"/>
 
      <war
        basedir="../"
        warfile="../../${project.distname}.war"
        webxml="web.xml">
        <exclude name="**/${distpath.project}/**"/>
       </war>
      <move file="../../${project.distname}.war" tofile="${distpath.project}/${project.distname}.war" />
 
    </target>
 
 
    <!-- Build project and create distribution-->
    <target name="all" depends="project,dist"/>
 
</project> | 
Partager