bump product version to 7.2.5.1
[LibreOffice.git] / odk / examples / DevelopersGuide / FirstSteps / build_FirstUnoContact.xml
blobec0eba70ade7a049bee26cb58fe551d2637e63ce
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  *   Licensed to the Apache Software Foundation (ASF) under one or more
12  *   contributor license agreements. See the NOTICE file distributed
13  *   with this work for additional information regarding copyright
14  *   ownership. The ASF licenses this file to you under the Apache
15  *   License, Version 2.0 (the "License"); you may not use this file
16  *   except in compliance with the License. You may obtain a copy of
17  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 -->
19 <project basedir="." default="all" name="FirstUnoContact">
21     <property environment="env"/>
22     <property name="OFFICE_HOME" value="${env.OFFICE_HOME}"/>
23     <property name="OO_SDK_HOME" value="${env.OO_SDK_HOME}"/>
25     <target name="init">
26         <property name="OUTDIR" value="${OO_SDK_HOME}/WINExample.out/class/FirstUnoContact"/>
27     </target>
29     <path id="office.class.path">
30         <filelist dir="${OFFICE_HOME}/program/classes"
31             files="libreoffice.jar"/>
32     </path>
34     <fileset id="bootstrap.glue.code" dir="${OO_SDK_HOME}/classes">
35         <patternset>
36             <include name="com/sun/star/lib/loader/*.class"/>
37         </patternset>
38     </fileset>
40     <target name="compile" depends="init">
41         <mkdir dir="${OUTDIR}"/>
42         <javac debug="true" deprecation="true" destdir="${OUTDIR}" srcdir=".">
43             <classpath refid="office.class.path"/>
44         </javac>
45     </target>
47     <target name="jar" depends="init,compile">
48         <jar basedir="${OUTDIR}" compress="true"
49             jarfile="${OUTDIR}/FirstUnoContact.jar">
50             <exclude name="**/*.java"/>
51             <exclude name="*.jar"/>
52             <fileset refid="bootstrap.glue.code"/>
53             <manifest>
54                 <attribute name="Main-Class" value="com.sun.star.lib.loader.Loader"/>
55                 <section name="com/sun/star/lib/loader/Loader.class">
56                 <attribute name="Application-Class" value="FirstUnoContact"/>
57                 </section>
58             </manifest>
59         </jar>
60     </target>
62     <target name="all"  description="Build everything." depends="init,compile,jar">
63         <echo message="Application built. FirstUnoContact!"/>
64     </target>
66     <target name="run" description="Try running it." depends="init,all">
67         <java jar="${OUTDIR}/FirstUnoContact.jar" failonerror="true" fork="true">
68         </java>
69     </target>
71     <target  name="clean" description="Clean all build products." depends="init">
72         <delete>
73             <fileset dir="${OUTDIR}">
74                 <include name="**/*.class"/>
75             </fileset>
76         </delete>
77         <delete file="${OUTDIR}/FirstUnoContact.jar"/>
78     </target>
80 </project>