Changeset 26174 in osm for applications/editors/josm/plugins/surveyor
- Timestamp:
- 2011-06-25T19:02:31+02:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/surveyor
- Files:
-
- 31 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/surveyor/build.xml
r25199 r26174 1 <?xml version="1.0" encoding=" UTF-8"?>1 <?xml version="1.0" encoding="utf-8"?> 2 2 <!-- 3 3 ** This is the build file for the surveyor plugin. … … 29 29 --> 30 30 <project name="surveyor" default="dist" basedir="."> 31 32 <!-- enter the SVN commit message --> 33 <property name="commit.message" value="Changed the constructor signature of the plugin main class" /> 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 <property name="plugin.main.version" value="3835" /> 36 37 38 <property name="josm" location="../../core/dist/josm-custom.jar"/> 39 <property name="plugin.dist.dir" value="../../dist"/> 40 <property name="plugin.build.dir" value="build"/> 41 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 42 <property name="livegpsplugin.jar" value="${plugin.dist.dir}/livegps.jar"/> 43 <property name="ant.build.javac.target" value="1.5"/> 44 <target name="init"> 45 <mkdir dir="${plugin.build.dir}"/> 46 </target> 47 <target name="compile" depends="init"> 48 <echo message="creating ${plugin.jar}"/> 49 <javac srcdir="src" debug="true" destdir="${plugin.build.dir}"> 50 <compilerarg value="-Xlint:deprecation"/> 51 <compilerarg value="-Xlint:unchecked"/> 52 <classpath> 53 <pathelement location="${josm}"/> 54 <pathelement location="${livegpsplugin.jar}"/> 55 </classpath> 56 </javac> 57 </target> 58 <target name="dist" depends="compile,revision"> 59 <copy todir="${plugin.build.dir}/"> 60 <fileset dir="resources"> 61 <include name="*.xml"/> 62 <include name="audio/*"/> 63 </fileset> 64 </copy> 65 <copy todir="${plugin.build.dir}/images"> 66 <fileset dir="images"/> 67 </copy> 68 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 69 <manifest> 70 <attribute name="Author" value="Christof Dallermassl"/> 71 <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.surveyor.SurveyorPlugin"/> 72 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 73 <attribute name="Plugin-Description" value="Allow adding markers/nodes on current gps positions."/> 74 <attribute name="Plugin-Icon" value="images/surveyormenu.png"/> 75 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Surveyor"/> 76 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 77 <attribute name="Plugin-Requires" value="livegps"/> 78 <attribute name="Plugin-Stage" value="60"/> 79 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 80 </manifest> 81 </jar> 82 </target> 83 <target name="revision"> 84 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 85 <env key="LANG" value="C"/> 86 <arg value="info"/> 87 <arg value="--xml"/> 88 <arg value="."/> 89 </exec> 90 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 91 <delete file="REVISION"/> 92 </target> 93 <target name="clean"> 94 <delete dir="${plugin.build.dir}"/> 95 <delete file="${plugin.jar}"/> 96 </target> 97 <target name="install" depends="dist"> 98 <property environment="env"/> 99 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 100 <and> 101 <os family="windows"/> 102 </and> 103 </condition> 104 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 105 </target> 106 107 <!-- 108 ************************** Publishing the plugin *********************************** 109 --> 110 <!-- 111 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 112 ** property ${coreversion.info.entry.revision} 113 ** 114 --> 115 <target name="core-info"> 116 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> 117 <env key="LANG" value="C"/> 118 <arg value="info"/> 119 <arg value="--xml"/> 120 <arg value="../../core"/> 121 </exec> 122 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/> 123 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 124 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 125 <delete file="core.info.xml" /> 126 </target> 127 128 <!-- 129 ** commits the source tree for this plugin 130 --> 131 <target name="commit-current"> 132 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 133 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 134 <env key="LANG" value="C"/> 135 <arg value="commit"/> 136 <arg value="-m '${commit.message}'"/> 137 <arg value="."/> 138 </exec> 139 </target> 140 141 <!-- 142 ** updates (svn up) the source tree for this plugin 143 --> 144 <target name="update-current"> 145 <echo>Updating plugin source ...</echo> 146 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 147 <env key="LANG" value="C"/> 148 <arg value="up"/> 149 <arg value="."/> 150 </exec> 151 <echo>Updating ${plugin.jar} ...</echo> 152 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 153 <env key="LANG" value="C"/> 154 <arg value="up"/> 155 <arg value="../dist/${plugin.jar}"/> 156 </exec> 157 </target> 158 159 <!-- 160 ** commits the plugin.jar 161 --> 162 <target name="commit-dist"> 163 <echo> 164 ***** Properties of published ${plugin.jar} ***** 165 Commit message : '${commit.message}' 166 Plugin-Mainversion: ${plugin.main.version} 167 JOSM build version: ${coreversion.info.entry.revision} 168 Plugin-Version : ${version.entry.commit.revision} 169 ***** / Properties of published ${plugin.jar} ***** 170 171 Now commiting ${plugin.jar} ... 172 </echo> 173 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 174 <env key="LANG" value="C"/> 175 <arg value="-m '${commit.message}'"/> 176 <arg value="commit"/> 177 <arg value="${plugin.jar}"/> 178 </exec> 179 </target> 180 181 <!-- ** make sure svn is present as a command line tool ** --> 182 <target name="ensure-svn-present"> 183 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code"> 184 <env key="LANG" value="C" /> 185 <arg value="--version" /> 186 </exec> 187 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system."> 188 <!-- return code not set at all? Most likely svn isn't installed --> 189 <condition> 190 <not> 191 <isset property="svn.exit.code" /> 192 </not> 193 </condition> 194 </fail> 195 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system."> 196 <!-- error code from SVN? Most likely svn is not what we are looking on this system --> 197 <condition> 198 <isfailure code="${svn.exit.code}" /> 199 </condition> 200 </fail> 201 </target> 202 203 <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist"> 204 </target> 31 <!-- enter the SVN commit message --> 32 <property name="commit.message" value="Changed the constructor signature of the plugin main class"/> 33 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 34 <property name="plugin.main.version" value="3835"/> 35 <property name="josm" location="../../core/dist/josm-custom.jar"/> 36 <property name="plugin.dist.dir" value="../../dist"/> 37 <property name="plugin.build.dir" value="build"/> 38 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 39 <property name="livegpsplugin.jar" value="${plugin.dist.dir}/livegps.jar"/> 40 <property name="ant.build.javac.target" value="1.5"/> 41 <target name="init"> 42 <mkdir dir="${plugin.build.dir}"/> 43 </target> 44 <target name="compile" depends="init"> 45 <echo message="creating ${plugin.jar}"/> 46 <javac srcdir="src" debug="true" destdir="${plugin.build.dir}"> 47 <compilerarg value="-Xlint:deprecation"/> 48 <compilerarg value="-Xlint:unchecked"/> 49 <classpath> 50 <pathelement location="${josm}"/> 51 <pathelement location="${livegpsplugin.jar}"/> 52 </classpath> 53 </javac> 54 </target> 55 <target name="dist" depends="compile,revision"> 56 <copy todir="${plugin.build.dir}/"> 57 <fileset dir="resources"> 58 <include name="*.xml"/> 59 <include name="audio/*"/> 60 </fileset> 61 </copy> 62 <copy todir="${plugin.build.dir}/images"> 63 <fileset dir="images"/> 64 </copy> 65 <copy todir="${plugin.build.dir}/data"> 66 <fileset dir="data"/> 67 </copy> 68 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 69 <manifest> 70 <attribute name="Author" value="Christof Dallermassl"/> 71 <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.surveyor.SurveyorPlugin"/> 72 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 73 <attribute name="Plugin-Description" value="Allow adding markers/nodes on current gps positions."/> 74 <attribute name="Plugin-Icon" value="images/surveyormenu.png"/> 75 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Surveyor"/> 76 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 77 <attribute name="Plugin-Requires" value="livegps"/> 78 <attribute name="Plugin-Stage" value="60"/> 79 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 80 </manifest> 81 </jar> 82 </target> 83 <target name="revision"> 84 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 85 <env key="LANG" value="C"/> 86 <arg value="info"/> 87 <arg value="--xml"/> 88 <arg value="."/> 89 </exec> 90 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 91 <delete file="REVISION"/> 92 </target> 93 <target name="clean"> 94 <delete dir="${plugin.build.dir}"/> 95 <delete file="${plugin.jar}"/> 96 </target> 97 <target name="install" depends="dist"> 98 <property environment="env"/> 99 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 100 <and> 101 <os family="windows"/> 102 </and> 103 </condition> 104 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 105 </target> 106 <!-- 107 ************************** Publishing the plugin *********************************** 108 --> 109 <!-- 110 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 111 ** property ${coreversion.info.entry.revision} 112 ** 113 --> 114 <target name="core-info"> 115 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> 116 <env key="LANG" value="C"/> 117 <arg value="info"/> 118 <arg value="--xml"/> 119 <arg value="../../core"/> 120 </exec> 121 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/> 122 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 123 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 124 <delete file="core.info.xml"/> 125 </target> 126 <!-- 127 ** commits the source tree for this plugin 128 --> 129 <target name="commit-current"> 130 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 131 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 132 <env key="LANG" value="C"/> 133 <arg value="commit"/> 134 <arg value="-m '${commit.message}'"/> 135 <arg value="."/> 136 </exec> 137 </target> 138 <!-- 139 ** updates (svn up) the source tree for this plugin 140 --> 141 <target name="update-current"> 142 <echo>Updating plugin source ...</echo> 143 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 144 <env key="LANG" value="C"/> 145 <arg value="up"/> 146 <arg value="."/> 147 </exec> 148 <echo>Updating ${plugin.jar} ...</echo> 149 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 150 <env key="LANG" value="C"/> 151 <arg value="up"/> 152 <arg value="../dist/${plugin.jar}"/> 153 </exec> 154 </target> 155 <!-- 156 ** commits the plugin.jar 157 --> 158 <target name="commit-dist"> 159 <echo> 160 ***** Properties of published ${plugin.jar} ***** 161 Commit message : '${commit.message}' 162 Plugin-Mainversion: ${plugin.main.version} 163 JOSM build version: ${coreversion.info.entry.revision} 164 Plugin-Version : ${version.entry.commit.revision} 165 ***** / Properties of published ${plugin.jar} ***** 166 167 Now commiting ${plugin.jar} ... 168 </echo> 169 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 170 <env key="LANG" value="C"/> 171 <arg value="-m '${commit.message}'"/> 172 <arg value="commit"/> 173 <arg value="${plugin.jar}"/> 174 </exec> 175 </target> 176 <!-- ** make sure svn is present as a command line tool ** --> 177 <target name="ensure-svn-present"> 178 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code"> 179 <env key="LANG" value="C"/> 180 <arg value="--version"/> 181 </exec> 182 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system."> 183 <!-- return code not set at all? Most likely svn isn't installed --> 184 <condition> 185 <not> 186 <isset property="svn.exit.code"/> 187 </not> 188 </condition> 189 </fail> 190 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system."> 191 <!-- error code from SVN? Most likely svn is not what we are looking on this system --> 192 <condition> 193 <isfailure code="${svn.exit.code}"/> 194 </condition> 195 </fail> 196 </target> 197 <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist"> 198 </target> 205 199 </project>
Note:
See TracChangeset
for help on using the changeset viewer.