summaryrefslogtreecommitdiffstats
path: root/branches/site-20070701-mvnbased/build.xml
blob: 9a51f53b3a33317055537e29c34a20c2bb2d4ebb (plain)
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
<?xml version="1.0"?>
<project name="site" default="docs" basedir=".">

    <!-- Initialization properties -->
    <property name="project.name"   value="site"/>

    <!-- The source directory for our XML source documents which are
    to be sytlized and transformed into XHTML. -->
    <property name="docs.src" value="site-author"/>

    <!-- The destination directory for content generated from our XML
    sources. -->
    <property name="docs.dest" value="site-publish"/>

    <path id="classpath">
        <fileset dir="./lib">
            <include name="**/*.jar"/>
        </fileset>
    </path>

    <target name="prepare">    
        <available classname="org.apache.velocity.anakia.AnakiaTask" 
            property="AnakiaTask.present">
            <classpath refid="classpath"/>
        </available>
    </target>

    <target depends="prepare" name="prepare-error" unless="AnakiaTask.present">
        <echo>
            AnakiaTask is not present! Please check to make sure that 
            velocity.jar is in your classpath.
        </echo>
    </target>

    <target name="docs" depends="prepare-error" if="AnakiaTask.present">
        <taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
            <classpath refid="classpath"/>
        </taskdef>
        <anakia basedir="${docs.src}" destdir="${docs.dest}/"
             extension=".html" style="./site.vsl"
             projectFile="stylesheets/project.xml"
             excludes="**/stylesheets/** empty.xml"
             includes="**/*.xml"
             lastModifiedCheck="true"
             templatePath="${docs.src}/stylesheets"
        >
        </anakia>

        <copy todir="${docs.dest}/" filtering="no">
            <fileset dir="${docs.src}/">
                <!-- Ignore the Anakia style sheet used for processing
                of the xdocs, and the unprocessed xdocs themselves,
                but copy all other content to the directory which is
                checked out on the server. -->
                <exclude name="**/*.xml"/>
                <exclude name="**/stylesheets/**"/>
                <!-- Editor-specific ignores. -->
                <exclude name="**/*~"/>
                <exclude name="**/.#*"/>
            </fileset>
        </copy>

    </target>
    <target name="clean">
       <delete >
         <fileset dir="site-publish" excludes="**/.svn/*"/>
        </delete>
    </target>
</project>