[2936] | 1 | <project name="surveyor" default="dist" basedir=".">
|
---|
| 2 |
|
---|
[3411] | 3 | <!-- compilation properties -->
|
---|
[3788] | 4 | <property name="josm.build.dir" value="../../core"/>
|
---|
[3411] | 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"/>
|
---|
[3790] | 9 | <property name="livegpsplugin.jar" value="../livegps/livegps.jar"/>
|
---|
[3411] | 10 |
|
---|
| 11 | <!-- plugin meta data (enter new version number if anything changed!) -->
|
---|
[3962] | 12 | <property name="plugin.version" value="1.3.1"/>
|
---|
[3411] | 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 |
|
---|
[2936] | 23 |
|
---|
[3411] | 24 | <target name="dist" depends="compile,site">
|
---|
[2936] | 25 | <!-- images -->
|
---|
[3962] | 26 | <copy todir="${plugin.build.dir}/">
|
---|
| 27 | <fileset dir="resources">
|
---|
[2936] | 28 | <include name="*.xml"/>
|
---|
[3962] | 29 | <include name="audio/*"/>
|
---|
| 30 | </fileset>
|
---|
[2936] | 31 | </copy>
|
---|
| 32 |
|
---|
[3411] | 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>
|
---|
[2936] | 43 | </target>
|
---|
| 44 |
|
---|
| 45 | <target name="compile" depends="init">
|
---|
[3080] | 46 | <mkdir dir="${plugin.build.dir}"/>
|
---|
[2936] | 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>
|
---|
[3080] | 53 | <pathelement location="${livegpsplugin.jar}"/>
|
---|
[2936] | 54 | </classpath>
|
---|
| 55 | </javac>
|
---|
| 56 | </target>
|
---|
| 57 |
|
---|
[3411] | 58 | <target name="install" depends="dist">
|
---|
| 59 | <copy file="${plugin.jar}" todir="${josm.home.dir}/plugins" />
|
---|
| 60 | </target>
|
---|
[2936] | 61 |
|
---|
[3080] | 62 | <target name="init">
|
---|
[3411] | 63 | <echo>java version: ${java.version}</echo>
|
---|
| 64 | </target>
|
---|
[2936] | 65 |
|
---|
[3411] | 66 | <target name="clean">
|
---|
| 67 | <delete dir="${plugin.build.dir}" />
|
---|
| 68 | <delete dir="${plugin.site.file}" />
|
---|
| 69 | <delete dir="${plugin.jar}" />
|
---|
| 70 | </target>
|
---|
[2936] | 71 |
|
---|
[3740] | 72 | <!-- write site description for the given plugin so josm will accept it -->
|
---|
[3411] | 73 | <target name="site">
|
---|
| 74 | <echo message="creating site description in ${plugin.site.file}"/>
|
---|
[3740] | 75 | <echo file="${plugin.site.file}"><!-- plugins available on this site -->
|
---|
| 76 | <plugins>
|
---|
| 77 | <plugin id="${ant.project.name}" version="${plugin.version}">
|
---|
| 78 | <name>${ant.project.name}</name>
|
---|
| 79 | <description>${plugin.description}</description>
|
---|
| 80 | <resource>${plugin.site.url}${plugin.jar}</resource>
|
---|
| 81 | </plugin>
|
---|
| 82 | </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}"/>
|
---|
[3411] | 89 | <echo file="${plugin.site.file}"><?xml version="1.0"?>
|
---|
| 90 | <site version="1.0">
|
---|
| 91 | <!-- meta data of site -->
|
---|
| 92 | <site-info>
|
---|
| 93 | <site-name>${plugin.site.description}</site-name>
|
---|
| 94 | <site-url>${plugin.site.url}</site-url>
|
---|
| 95 | </site-info>
|
---|
| 96 |
|
---|
| 97 | <!-- plugins available on this site -->
|
---|
| 98 | <plugins>
|
---|
| 99 | <plugin id="${ant.project.name}" version="${plugin.version}">
|
---|
| 100 | <name>${ant.project.name}</name>
|
---|
| 101 | <description>${plugin.description}</description>
|
---|
| 102 | <resources>
|
---|
[3740] | 103 | <resource src="${plugin.site.url}${plugin.jar}"
|
---|
| 104 | target="${josm.home.dir}/plugins/${plugin.jar}"/>
|
---|
[3411] | 105 | </resources>
|
---|
| 106 | </plugin>
|
---|
| 107 | </plugins>
|
---|
| 108 | </site>
|
---|
| 109 | </echo>
|
---|
| 110 | </target>
|
---|
| 111 |
|
---|
[3740] | 112 |
|
---|
[3411] | 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 |
|
---|
[2936] | 123 | </project>
|
---|