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

Last change on this file since 3769 was 3740, checked in by christofd, 17 years ago

new version (new version of josm)

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