xref: /aoo42x/test/smoketestdoc/build.xml (revision 4aa87146)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--***********************************************************
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements.  See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership.  The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License.  You may obtain a copy of the License at
11 *
12 *   http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied.  See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 *
21 ***********************************************************-->
22
23
24<project name="smoketest" default="smoketest">
25    <dirname property="project.dir" file="${ant.file.smoketest}"/>
26    <property file="${project.dir}/../../main/ant.properties"/>
27
28    <property name="data.dir" value="${project.dir}/data"/>
29    <property name="build.base.dir" value="${project.dir}/target"/>
30    <property name="jar.dir" value="${build.base.dir}/TestExtension"/>
31    <import file="${SRC_ROOT}/solenv/ant/aoo-ant.xml"/>
32
33    <target name="init-project">
34        <property name="jar.name" value="TestExtension"/>
35        <property name="jar.manifest" value="${project.dir}/MANIFEST.MF"/>
36        <mkdir dir="${build.base.dir}/TestExtension"/>
37
38        <path id="main.classpath">
39            <pathelement location="${OUTDIR}/bin/juh.jar"/>
40            <pathelement location="${OUTDIR}/bin/jurt.jar"/>
41            <pathelement location="${OUTDIR}/bin/ridl.jar"/>
42            <pathelement location="${OUTDIR}/bin/unoil.jar"/>
43        </path>
44    </target>
45
46    <target name="pre-clean">
47        <delete dir="${project.dir}/target"/>
48    </target>
49
50    <target name="smoketestdoc">
51        <mkdir dir="${project.dir}/target/smoketestdoc"/>
52        <copy todir="${project.dir}/target/smoketestdoc">
53            <resources>
54                <file name="${data.dir}/content.xml"/>
55                <file name="${data.dir}/meta.xml"/>
56                <file name="${data.dir}/settings.xml"/>
57                <file name="${data.dir}/styles.xml"/>
58            </resources>
59        </copy>
60        <echo message="application/vnd.sun.xml.writer" file="${project.dir}/target/smoketestdoc/mimetype"/>
61        <mkdir dir="${project.dir}/target/smoketestdoc/META-INF"/>
62        <copy file="${data.dir}/manifest.xml" todir="${project.dir}/target/smoketestdoc/META-INF"/>
63        <mkdir dir="${project.dir}/target/smoketestdoc/Basic"/>
64        <copy file="${data.dir}/script-lc.xml" todir="${project.dir}/target/smoketestdoc/Basic"/>
65        <mkdir dir="${project.dir}/target/smoketestdoc/Basic/Standard"/>
66        <copy todir="${project.dir}/target/smoketestdoc/Basic/Standard">
67            <resources>
68                <file name="${data.dir}/script-lb.xml"/>
69                <file name="${data.dir}/Events.xml"/>
70                <file name="${data.dir}/Global.xml"/>
71                <file name="${data.dir}/Test_10er.xml"/>
72                <file name="${data.dir}/Test_DB.xml"/>
73                <file name="${data.dir}/Test_Ext.xml"/>
74            </resources>
75        </copy>
76        <mkdir dir="${project.dir}/target/smoketestdoc/Dialogs"/>
77        <copy file="${data.dir}/dialog-lc.xml" todir="${project.dir}/target/smoketestdoc/Dialogs"/>
78        <mkdir dir="${project.dir}/target/smoketestdoc/Dialogs/Standard"/>
79        <copy todir="${project.dir}/target/smoketestdoc/Dialogs/Standard">
80            <resources>
81                <file name="${data.dir}/dialog-lb.xml"/>
82                <file name="${data.dir}/OptionsDlg.xml"/>
83            </resources>
84        </copy>
85        <zip destfile="${project.dir}/target/smoketestdoc.odt" basedir="${project.dir}/target/smoketestdoc" filesonly="true"/>
86    </target>
87
88    <target name="TestExtension" depends="main,smoketestdoc">
89        <copy tofile="${build.base.dir}/TestExtension/TestExtension.rdb" file="${idl.build.dir}/registry.rdb"/>
90        <mkdir dir="${build.base.dir}/TestExtension/META-INF"/>
91        <copy todir="${build.base.dir}/TestExtension/META-INF" file="${project.dir}/manifest.xml"/>
92        <zip destfile="${build.base.dir}/TestExtension.oxt" basedir="${build.base.dir}/TestExtension"/>
93    </target>
94
95    <target name="smoketest" depends="smoketestdoc,TestExtension"/>
96</project>
97
98