source: subversion/applications/editors/josm/plugins/openstreetbugs/build.xml @ 13212

Last change on this file since 13212 was 12780, checked in by Dirk Stoecker, 11 years ago

removed tab stop usage

File size: 3.5 KB
Line 
1<project name="openstreetbugs" default="dist" basedir=".">
2<!-- the path to JOSM source code (project directory) -->
3    <property name="josm.base.dir" value="../../core" />
4    <property name="josm.dist.dir" value="../../dist" />
5<!--a osm file, which will be loaded, when running the test target -->
6    <property name="osmfile" value="/tmp/hoe.osm" />
7<!-- compilation properties -->
8    <property name="josm.build.dir" value="${josm.base.dir}/build" />
9    <property name="josm.home.dir" value="${user.home}/.josm" />
10    <property name="josm" location="${josm.base.dir}/dist/josm-custom.jar" />
11    <property name="lib.dir" value="lib" />
12    <property name="plugin.build.dir" value="build" />
13    <property name="plugin.name" value="${ant.project.name}" />
14    <property name="plugin.jar" value="${plugin.build.dir}/${plugin.name}.jar" />
15    <property name="ant.build.javac.target" value="1.5" />
16    <target name="init">
17        <mkdir dir="${plugin.build.dir}" />
18    </target>
19    <target name="compile" depends="init">
20        <echo message="creating ${plugin.jar}" />
21        <javac srcdir="src" classpath="${josm}" destdir="${plugin.build.dir}" debug="true">
22            <include name="**/*.java" />
23        </javac>
24    </target>
25    <target name="dist" depends="clean, compile">
26<!-- copy images to jar -->
27        <copy todir="${plugin.build.dir}/images">
28            <fileset dir="images" />
29        </copy>
30        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
31            <env key="LANG" value="C"/>
32            <arg value="info"/>
33            <arg value="--xml"/>
34            <arg value="."/>
35        </exec>
36        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
37        <delete file="REVISION"/>
38<!-- create the jar file -->
39        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
40            <manifest>
41                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.osb.OsbPlugin" />
42                <attribute name="Plugin-Description" value="Imports issues from OpenStreetBugs" />
43                <attribute name="Plugin-Date" value="${version.entry.commit.date}" />
44                <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
45                <attribute name="Plugin-Mainversion" value="1180"/>
46                <attribute name="Author" value="Henrik Niehaus" />
47            </manifest>
48        </jar>
49        <copy todir="${josm.dist.dir}" file="${plugin.jar}" />
50    </target>
51<!-- clean target -->
52    <target name="clean">
53        <delete dir="build" />
54    </target>
55    <target name="install" depends="dist">
56        <condition property="isWindows">
57            <os family="windows" />
58        </condition>
59        <condition property="isUnix">
60            <os family="unix" />
61        </condition>
62        <antcall target="install_win" />
63        <antcall target="install_linux" />
64    </target>
65    <target name="install_win" if="isWindows">
66        <property environment="env"/>
67        <copy file="${plugin.jar}" todir="${env.APPDATA}/JOSM/plugins" />
68    </target>
69    <target name="install_linux" if="isUnix">
70        <copy file="${plugin.jar}" todir="${user.home}/.josm/plugins" />
71    </target>
72    <target name="test" depends="install">
73        <java jar="${josm}" fork="true">
74            <arg value="${osmfile}" />
75            <jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7777" />
76        </java>
77    </target>
78</project>
Note: See TracBrowser for help on using the repository browser.