myantce.ant 1.6 KB
Newer Older
qaomia's avatar
qaomia committed
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
4
<project basedir="." name="myantce" default="main">
    <property file="build.properties"/>

qaomia's avatar
qaomia committed
5
6
7
8
9
10
11
    <delete dir="${tmp}" failonerror="false"/>
    <mkdir dir="${tmp}"/>
    <delete dir="${out}" failonerror="false"/>
    <mkdir dir="${out}"/>
	<delete dir="${log}" failonerror="false"/>
    <mkdir dir="${log}"/>

Jean Vintache's avatar
Jean Vintache committed
12
13
14
15
    <!-- Apply Xslt -->
    <target name="tranformation">
        <xslt in="${xsl}/etherpad2hdoc.xsl" out="${out}/etherpad.xml" style="${xsl}/etherpad2hdoc.xsl"/>
    </target>
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
    
    <!-- Builds Hdoc structure -->
    <target name="construct_hdoc">
        <delete dir="${emplacement_hdoc}" failonerror="false"/>
        <mkdir dir="${emplacement_hdoc}" />
        <mkdir dir="${emplacement_hdoc}/META-INF" />
        <touch file="${emplacement_hdoc}/META-INF/container.xml" />
        <touch file="${emplacement_hdoc}/mimetype" />
        <echo message="application/x-hdoc+zip" file="${emplacement_hdoc}/mimetype" />
    </target>
    
    <!-- Fill Hdoc container -->
    <target name="fill_container" depends="construct_hdoc">
        <echoxml file="${emplacement_hdoc}/META-INF/container.xml">
            <container version="1.0">
                <rootfiles>
                    <rootfile full-path="${rootfile}" media-type="text/xml" />
                </rootfiles>
            </container>
        </echoxml>
    </target>
    
    <!-- Zip Hdoc container -->
    <target name="zip">
        <zip basedir="${emplacement_hdoc}" destfile="outputHdoc.hdoc" />
    </target>
    
Jean Vintache's avatar
Jean Vintache committed
43
44
    <target name="main" depends="tranformation,fill_container,zip">
        
45
    </target>
qaomia's avatar
qaomia committed
46
47
    
</project>