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

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

updated version

File size: 3.2 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 <attribute name="Plugin-Mainversion" value="1180" />
56 </manifest>
57 </jar>
58 </target>
59
60 <target name="compile" depends="init">
61 <echo message="creating ${plugin.jar}"/>
62 <mkdir dir="${plugin.build.dir}"/>
63 <copy todir="build/images" >
64 <fileset dir="images" />
65 </copy>
66 <javac srcdir="src" destdir="${plugin.build.dir}" debug="true" source="1.5" target="1.5">
67 <compilerarg value="-Xlint:deprecation"/>
68 <compilerarg value="-Xlint:unchecked"/>
69 <classpath>
70 <pathelement path="${josm.build.dir}/build"/>
71 <fileset dir="${josm.build.dir}/lib">
72 <include name="**/*.jar"/>
73 </fileset>
74 <pathelement location="${livegpsplugin.jar}"/>
75 </classpath>
76 </javac>
77 </target>
78
79 <target name="install" depends="dist">
80 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
81 </target>
82
83 <target name="init">
84 <echo>java version: ${java.version}</echo>
85 </target>
86
87 <target name="clean">
88 <delete dir="${plugin.build.dir}" />
89 <delete file="${plugin.jar}" />
90 </target>
91</project>
Note: See TracBrowser for help on using the repository browser.