source: osm/applications/editors/josm/plugins/surveyor/build.xml@ 10336

Last change on this file since 10336 was 10336, checked in by stoecker, 16 years ago

some updates

File size: 3.1 KB
Line 
1<project name="surveyor" default="dist" basedir=".">
2
3 <!-- josm "user home" directory depends on the platform used (windows has a different place than unix/linux) -->
4 <property environment="env"/>
5 <condition property="josm.home.dir" value="${env.APPDATA}/JOSM" else="${user.home}/.josm">
6 <and>
7 <os family="windows"/>
8 </and>
9 </condition>
10
11 <!-- compilation properties -->
12 <property name="josm.build.dir" value="../../core"/>
13 <property name="josm.plugins.dir" value="${josm.home.dir}/plugins"/>
14 <property name="josm" location="../../core/dist/josm-custom.jar" />
15 <property name="plugin.build.dir" value="build"/>
16 <property name="plugin.dist.dir" value="../../dist"/>
17 <property name="plugin.name" value="${ant.project.name}"/>
18 <property name="plugin.jar" value="../../dist/${plugin.name}.jar"/>
19
20 <property name="livegpsplugin.jar" value="../../dist/livegps.jar"/>
21
22 <property name="plugin.description" value="Allow adding markers/nodes on current gps positions."/>
23 <property name="plugin.stage" value="60"/>
24 <property name="plugin.class" value="at.dallermassl.josm.plugin.surveyor.SurveyorPlugin"/>
25
26 <property name="ant.build.javac.target" value="1.5"/>
27
28
29 <target name="dist" depends="compile">
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
39 <!-- images -->
40 <copy todir="${plugin.build.dir}/">
41 <fileset dir="resources">
42 <include name="*.xml"/>
43 <include name="audio/*"/>
44 </fileset>
45 </copy>
46
47 <!-- create jar file -->
48 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
49 <manifest>
50 <attribute name="Plugin-Class" value="${plugin.class}" />
51 <attribute name="Plugin-Description" value="${plugin.description}" />
52 <attribute name="Plugin-Stage" value="${plugin.stage}" />
53 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
54 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
55 </manifest>
56 </jar>
57 </target>
58
59 <target name="compile" depends="init">
60 <echo message="creating ${plugin.jar}"/>
61 <mkdir dir="${plugin.build.dir}"/>
62 <copy todir="build/images" >
63 <fileset dir="images" />
64 </copy>
65 <javac srcdir="src" destdir="${plugin.build.dir}" debug="true" source="1.5" target="1.5">
66 <classpath>
67 <pathelement path="${josm.build.dir}/build"/>
68 <fileset dir="${josm.build.dir}/lib">
69 <include name="**/*.jar"/>
70 </fileset>
71 <pathelement location="${livegpsplugin.jar}"/>
72 </classpath>
73 </javac>
74 </target>
75
76 <target name="install" depends="dist">
77 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
78 </target>
79
80 <target name="init">
81 <echo>java version: ${java.version}</echo>
82 </target>
83
84 <target name="clean">
85 <delete dir="${plugin.build.dir}" />
86 <delete file="${plugin.jar}" />
87 </target>
88</project>
Note: See TracBrowser for help on using the repository browser.