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

Last change on this file since 4017 was 3962, checked in by christofd, 17 years ago

moved resources into separate directory
made play sound in background thread

File size: 4.6 KB
Line 
1<project name="surveyor" default="dist" basedir=".">
2
3 <!-- compilation properties -->
4 <property name="josm.build.dir" value="../../core"/>
5 <property name="josm.home.dir" value="${user.home}/.josm"/>
6 <property name="plugin.build.dir" value="bin"/>
7 <property name="plugin.name" value="${ant.project.name}"/>
8 <property name="plugin.jar" value="${plugin.name}.jar"/>
9 <property name="livegpsplugin.jar" value="../livegps/livegps.jar"/>
10
11 <!-- plugin meta data (enter new version number if anything changed!) -->
12 <property name="plugin.version" value="1.3.1"/>
13 <property name="plugin.description" value="Allow adding markers/nodes on current gps positions (V${plugin.version})."/>
14 <property name="plugin.stage" value="60"/>
15 <property name="plugin.class" value="at.dallermassl.josm.plugin.surveyor.SurveyorPlugin"/>
16
17 <!-- update site meta data -->
18 <property name="plugin.site.file" value="josm-site.xml"/>
19 <property name="plugin.site.description" value="Josm's Surveyor Update Site"/>
20 <property name="plugin.site.url" value="http://www.tegmento.org/~cdaller/josm/surveyor/"/>
21 <property name="plugin.site.upload.target" value="cdaller@www.tegmento.org:public_html/josm/surveyor/"/>
22
23
24 <target name="dist" depends="compile,site">
25 <!-- images -->
26 <copy todir="${plugin.build.dir}/">
27 <fileset dir="resources">
28 <include name="*.xml"/>
29 <include name="audio/*"/>
30 </fileset>
31 </copy>
32
33 <!-- create jar file -->
34 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
35 <manifest>
36 <attribute name="Plugin-Class" value="${plugin.class}" />
37 <attribute name="Plugin-Description" value="${plugin.description}" />
38 <attribute name="Plugin-Version" value="${plugin.version}" />
39 <!--attribute name="Plugin-Dependencies" value="org.eigenheimstrasse.josm" /-->
40 <attribute name="Plugin-Stage" value="${plugin.stage}" />
41 </manifest>
42 </jar>
43 </target>
44
45 <target name="compile" depends="init">
46 <mkdir dir="${plugin.build.dir}"/>
47 <javac srcdir="src" destdir="${plugin.build.dir}" debug="true" source="1.5" target="1.5">
48 <classpath>
49 <pathelement path="${josm.build.dir}/build"/>
50 <fileset dir="${josm.build.dir}/lib">
51 <include name="**/*.jar"/>
52 </fileset>
53 <pathelement location="${livegpsplugin.jar}"/>
54 </classpath>
55 </javac>
56 </target>
57
58 <target name="install" depends="dist">
59 <copy file="${plugin.jar}" todir="${josm.home.dir}/plugins" />
60 </target>
61
62 <target name="init">
63 <echo>java version: ${java.version}</echo>
64 </target>
65
66 <target name="clean">
67 <delete dir="${plugin.build.dir}" />
68 <delete dir="${plugin.site.file}" />
69 <delete dir="${plugin.jar}" />
70 </target>
71
72 <!-- write site description for the given plugin so josm will accept it -->
73 <target name="site">
74 <echo message="creating site description in ${plugin.site.file}"/>
75 <echo file="${plugin.site.file}">&lt;!-- plugins available on this site -->
76 &lt;plugins>
77 &lt;plugin id="${ant.project.name}" version="${plugin.version}">
78 &lt;name>${ant.project.name}&lt;/name>
79 &lt;description>${plugin.description}&lt;/description>
80 &lt;resource>${plugin.site.url}${plugin.jar}&lt;/resource>
81 &lt;/plugin>
82 &lt;/plugins>
83 </echo>
84 </target>
85
86 <!-- write site description for the given plugin (not implemented in JOSM as full version yet!) -->
87 <target name="site-full-donotuse">
88 <echo message="creating site description in ${plugin.site.file}"/>
89 <echo file="${plugin.site.file}">&lt;?xml version="1.0"?>
90&lt;site version="1.0">
91 &lt;!-- meta data of site -->
92 &lt;site-info>
93 &lt;site-name>${plugin.site.description}&lt;/site-name>
94 &lt;site-url>${plugin.site.url}&lt;/site-url>
95 &lt;/site-info>
96
97 &lt;!-- plugins available on this site -->
98 &lt;plugins>
99 &lt;plugin id="${ant.project.name}" version="${plugin.version}">
100 &lt;name>${ant.project.name}&lt;/name>
101 &lt;description>${plugin.description}&lt;/description>
102 &lt;resources>
103 &lt;resource src="${plugin.site.url}${plugin.jar}"
104 target="${josm.home.dir}/plugins/${plugin.jar}"/>
105 &lt;/resources>
106 &lt;/plugin>
107 &lt;/plugins>
108&lt;/site>
109 </echo>
110 </target>
111
112
113 <!-- upload the site description and the jar file via ssh -->
114 <target name="upload" depends="dist,site">
115 <echo message="uploading jar and site description to ${plugin.site.upload.target}"/>
116 <exec executable="scp">
117 <arg value="${plugin.jar}"/>
118 <arg value="${plugin.site.file}"/>
119 <arg value="${plugin.site.upload.target}"/>
120 </exec>
121 </target>
122
123</project>
Note: See TracBrowser for help on using the repository browser.