Changeset 26174 in osm for applications/editors/josm/plugins/smed/plugs/oseam/build.xml
- Timestamp:
- 2011-06-25T19:02:31+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/build.xml
r23475 r26174 1 <?xml version="1.0" encoding=" UTF-8"?>1 <?xml version="1.0" encoding="utf-8"?> 2 2 <!-- 3 3 ** This is a template build file for a JOSM plugin. … … 29 29 --> 30 30 <project name="OSeaM" default="dist" basedir="."> 31 32 <!-- enter the SVN commit message --> 33 <property name="commit.message" value="some new features in internationalising" /> 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 <property name="plugin.main.version" value="3329" /> 36 37 <!-- Declaring time-stamps--> 38 <tstamp/> 39 40 <!-- 31 <!-- enter the SVN commit message --> 32 <property name="commit.message" value="some new features in internationalising"/> 33 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 34 <property name="plugin.main.version" value="3329"/> 35 <!-- Declaring time-stamps--> 36 <tstamp/> 37 <!-- 41 38 ************************************************ 42 39 ** should not be necessary to change the following properties 43 40 --> 44 <property name="josm" location="../../../../core/dist/josm-custom.jar"/> 45 <property name="smed" location="../../core/dist/smed.jar"/> 46 <property name="plugin.build.dir" value="build"/> 47 <property name="plugin.src.dir" value="src"/> 48 <property name="smed.build.dir" value="../../../smed/build"/> 49 <property name="delete_string" value="*${ant.project.name}.jar"/> 50 <!-- this is the directory where the plugin jar is copied to --> 51 <property name="plugin.dist.dir" value="../../dist"/> 52 <property name="ant.build.javac.target" value="1.5"/> 53 <property name="plugin.jar" value="${plugin.dist.dir}/00_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/> 54 55 <!-- 41 <property name="josm" location="../../../../core/dist/josm-custom.jar"/> 42 <property name="smed" location="../../core/dist/smed.jar"/> 43 <property name="plugin.build.dir" value="build"/> 44 <property name="plugin.src.dir" value="src"/> 45 <property name="smed.build.dir" value="../../../smed/build"/> 46 <property name="delete_string" value="*${ant.project.name}.jar"/> 47 <!-- this is the directory where the plugin jar is copied to --> 48 <property name="plugin.dist.dir" value="../../dist"/> 49 <property name="ant.build.javac.target" value="1.5"/> 50 <property name="plugin.jar" value="${plugin.dist.dir}/00_${DSTAMP}_${TSTAMP}_${ant.project.name}.jar"/> 51 <!-- 56 52 ********************************************************** 57 53 ** init - initializes the build 58 54 ********************************************************** 59 55 --> 60 <target name="init"> 61 <mkdir dir="${plugin.build.dir}"/> 62 <mkdir dir="${plugin.dist.dir}"/> 63 </target> 64 65 <!-- 56 <target name="init"> 57 <mkdir dir="${plugin.build.dir}"/> 58 <mkdir dir="${plugin.dist.dir}"/> 59 </target> 60 <!-- 66 61 ********************************************************** 67 62 ** compile - complies the source tree 68 63 ********************************************************** 69 64 --> 70 <target name="compile" depends="init"> 71 <echo message="compiling sources for ${plugin.jar} ... "/> 72 <javac srcdir="src" classpath="${josm}:${smed}" debug="true" destdir="${plugin.build.dir}"> 73 <compilerarg value="-Xlint:deprecation"/> 74 <compilerarg value="-Xlint:unchecked"/> 75 </javac> 76 </target> 77 78 79 <!-- 65 <target name="compile" depends="init"> 66 <echo message="compiling sources for ${plugin.jar} ... "/> 67 <javac srcdir="src" classpath="${josm}:${smed}" debug="true" destdir="${plugin.build.dir}"> 68 <compilerarg value="-Xlint:deprecation"/> 69 <compilerarg value="-Xlint:unchecked"/> 70 </javac> 71 </target> 72 <!-- 80 73 ********************************************************** 81 74 ** dist - creates the plugin jar 82 75 ********************************************************** 83 76 --> 84 <target name="dist" depends="compile,revision"> 85 <echo message="creating ${ant.project.name}.jar ... "/> 86 77 <target name="dist" depends="compile,revision"> 78 <echo message="creating ${ant.project.name}.jar ... "/> 87 79 <copy todir="${plugin.build.dir}/images"> 88 80 <fileset dir="${plugin.src.dir}/images"/> 89 81 </copy> 90 91 <copy todir="${plugin.build.dir}/images"> 92 <fileset dir="images"/> 93 </copy> 94 <copy todir="${plugin.build.dir}/oseam/msg"> 95 <fileset dir="${plugin.src.dir}/oseam/msg"/> 96 </copy> 97 <copy todir="${plugin.build.dir}"> 98 <fileset dir="."> 99 <include name="copyright.txt" /> 100 <include name="LICENSE.txt" /> 101 </fileset> 102 </copy> 103 104 <delete> 105 <fileset dir="${plugin.dist.dir}"> 106 <include name="${delete_string}"/> 107 </fileset> 108 </delete> 109 110 111 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 112 <!-- 82 <copy todir="${plugin.build.dir}/images"> 83 <fileset dir="images"/> 84 </copy> 85 <copy todir="${plugin.build.dir}/oseam/msg"> 86 <fileset dir="${plugin.src.dir}/oseam/msg"/> 87 </copy> 88 <copy todir="${plugin.build.dir}"> 89 <fileset dir="."> 90 <include name="copyright.txt"/> 91 <include name="LICENSE.txt"/> 92 </fileset> 93 </copy> 94 <delete> 95 <fileset dir="${plugin.dist.dir}"> 96 <include name="${delete_string}"/> 97 </fileset> 98 </delete> 99 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 100 <!-- 113 101 ************************************************ 114 102 ** configure these properties. Most of them will be copied to the plugins … … 118 106 ************************************************ 119 107 --> 120 <manifest> 121 <attribute name="Author" value="Werner, Malcolm"/> 122 <attribute name="Plugin-Class" value="toms.Toms"/> 123 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 124 <attribute name="Plugin-Description" value="Create and edit seamarks for OpenSeaMap"/> 125 <attribute name="Plugin-Icon" value="images/Smp.png"/> 126 <attribute name="Plugin-Link" value="http://openseamap.org/"/> 127 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 128 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 129 </manifest> 130 </jar> 131 </target> 132 133 <!-- 108 <manifest> 109 <attribute name="Author" value="Werner, Malcolm"/> 110 <attribute name="Plugin-Class" value="toms.Toms"/> 111 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 112 <attribute name="Plugin-Description" value="Create and edit seamarks for OpenSeaMap"/> 113 <attribute name="Plugin-Icon" value="images/Smp.png"/> 114 <attribute name="Plugin-Link" value="http://openseamap.org/"/> 115 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 116 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 117 </manifest> 118 </jar> 119 </target> 120 <!-- 134 121 ********************************************************** 135 122 ** revision - extracts the current revision number for the … … 138 125 ********************************************************** 139 126 --> 140 <target name="revision"> 141 142 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 143 <env key="LANG" value="C"/> 144 <arg value="info"/> 145 <arg value="--xml"/> 146 <arg value="."/> 147 </exec> 148 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 149 <delete file="REVISION"/> 150 </target> 151 152 <!-- 127 <target name="revision"> 128 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 129 <env key="LANG" value="C"/> 130 <arg value="info"/> 131 <arg value="--xml"/> 132 <arg value="."/> 133 </exec> 134 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 135 <delete file="REVISION"/> 136 </target> 137 <!-- 153 138 ********************************************************** 154 139 ** clean - clean up the build environment 155 140 ********************************************************** 156 141 --> 157 <target name="clean"> 158 <delete dir="${plugin.build.dir}"/> 159 <delete> 160 <fileset dir="${plugin.dist.dir}"> 161 <include name="${delete_string}"/> 162 </fileset> 163 </delete> 164 </target> 165 166 <!-- 142 <target name="clean"> 143 <delete dir="${plugin.build.dir}"/> 144 <delete> 145 <fileset dir="${plugin.dist.dir}"> 146 <include name="${delete_string}"/> 147 </fileset> 148 </delete> 149 </target> 150 <!-- 167 151 ********************************************************** 168 152 ** install - install the plugin in your local JOSM installation … … 170 154 ********************************************************** 171 155 --> 172 <target name="install-develop" depends="dist"> 173 <property environment="env"/> 174 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins/splug" else="${user.home}/.josm/plugins/splug"> 175 <and> 176 <os family="windows"/> 177 </and> 178 </condition> 179 180 <delete> 181 <fileset dir="${josm.plugins.dir}"> 182 <include name="${delete_string}"/> 183 </fileset> 184 </delete> 185 186 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 187 188 <delete file="${plugin.jar}"/> 189 190 </target> 191 192 <!-- 193 ************************** Publishing the plugin *********************************** 194 --> 195 <!-- 196 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 197 ** property ${coreversion.info.entry.revision} 198 ** 199 --> 200 201 <target name="core-info"> 202 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> 203 <env key="LANG" value="C"/> 204 <arg value="info"/> 205 <arg value="--xml"/> 206 <arg value="../../core"/> 207 </exec> 208 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/> 209 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 210 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 211 <delete file="core.info.xml" /> 212 </target> 213 214 <!-- 215 ** commits the source tree for this plugin 216 --> 217 <target name="commit-current"> 218 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 219 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 220 <env key="LANG" value="C"/> 221 <arg value="commit"/> 222 <arg value="-m '${commit.message}'"/> 223 <arg value="."/> 224 </exec> 225 </target> 226 227 <!-- 228 ** updates (svn up) the source tree for this plugin 229 --> 230 <target name="update-current"> 231 <echo>Updating plugin source ...</echo> 232 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 233 <env key="LANG" value="C"/> 234 <arg value="up"/> 235 <arg value="."/> 236 </exec> 237 <echo>Updating ${plugin.jar} ...</echo> 238 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 239 <env key="LANG" value="C"/> 240 <arg value="up"/> 241 <arg value="../dist/${plugin.jar}"/> 242 </exec> 243 </target> 244 245 <!-- 246 ** commits the plugin.jar 247 --> 248 <target name="commit-dist"> 249 <echo> 250 ***** Properties of published ${plugin.jar} ***** 251 Commit message : '${commit.message}' 252 Plugin-Mainversion: ${plugin.main.version} 253 JOSM build version: ${coreversion.info.entry.revision} 254 Plugin-Version : ${version.entry.commit.revision} 255 ***** / Properties of published ${plugin.jar} ***** 256 257 Now commiting ${plugin.jar} ... 258 </echo> 259 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 260 <env key="LANG" value="C"/> 261 <arg value="-m '${commit.message}'"/> 262 <arg value="commit"/> 263 <arg value="${plugin.jar}"/> 264 </exec> 265 </target> 266 267 <!-- ** make sure svn is present as a command line tool ** --> 268 <target name="ensure-svn-present"> 269 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code"> 270 <env key="LANG" value="C" /> 271 <arg value="--version" /> 272 </exec> 273 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system."> 274 <!-- return code not set at all? Most likely svn isn't installed --> 275 <condition> 276 <not> 277 <isset property="svn.exit.code" /> 278 </not> 279 </condition> 280 </fail> 281 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system."> 282 <!-- error code from SVN? Most likely svn is not what we are looking on this system --> 283 <condition> 284 <isfailure code="${svn.exit.code}" /> 285 </condition> 286 </fail> 287 </target> 288 289 <target name="publish"> <!-- depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist" --> 290 <echo>No normal josm-plugin, publishing over smed !!! 291 1. ant - dist to each subplugin 292 2. ant publish to smed 293 </echo> 294 </target> 156 <target name="install-develop" depends="dist"> 157 <property environment="env"/> 158 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins/splug" else="${user.home}/.josm/plugins/splug"> 159 <and> 160 <os family="windows"/> 161 </and> 162 </condition> 163 <delete> 164 <fileset dir="${josm.plugins.dir}"> 165 <include name="${delete_string}"/> 166 </fileset> 167 </delete> 168 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 169 <delete file="${plugin.jar}"/> 170 </target> 171 <!-- 172 ************************** Publishing the plugin *********************************** 173 --> 174 <!-- 175 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 176 ** property ${coreversion.info.entry.revision} 177 ** 178 --> 179 <target name="core-info"> 180 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> 181 <env key="LANG" value="C"/> 182 <arg value="info"/> 183 <arg value="--xml"/> 184 <arg value="../../core"/> 185 </exec> 186 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/> 187 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 188 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 189 <delete file="core.info.xml"/> 190 </target> 191 <!-- 192 ** commits the source tree for this plugin 193 --> 194 <target name="commit-current"> 195 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 196 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 197 <env key="LANG" value="C"/> 198 <arg value="commit"/> 199 <arg value="-m '${commit.message}'"/> 200 <arg value="."/> 201 </exec> 202 </target> 203 <!-- 204 ** updates (svn up) the source tree for this plugin 205 --> 206 <target name="update-current"> 207 <echo>Updating plugin source ...</echo> 208 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 209 <env key="LANG" value="C"/> 210 <arg value="up"/> 211 <arg value="."/> 212 </exec> 213 <echo>Updating ${plugin.jar} ...</echo> 214 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 215 <env key="LANG" value="C"/> 216 <arg value="up"/> 217 <arg value="../dist/${plugin.jar}"/> 218 </exec> 219 </target> 220 <!-- 221 ** commits the plugin.jar 222 --> 223 <target name="commit-dist"> 224 <echo> 225 ***** Properties of published ${plugin.jar} ***** 226 Commit message : '${commit.message}' 227 Plugin-Mainversion: ${plugin.main.version} 228 JOSM build version: ${coreversion.info.entry.revision} 229 Plugin-Version : ${version.entry.commit.revision} 230 ***** / Properties of published ${plugin.jar} ***** 231 232 Now commiting ${plugin.jar} ... 233 </echo> 234 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 235 <env key="LANG" value="C"/> 236 <arg value="-m '${commit.message}'"/> 237 <arg value="commit"/> 238 <arg value="${plugin.jar}"/> 239 </exec> 240 </target> 241 <!-- ** make sure svn is present as a command line tool ** --> 242 <target name="ensure-svn-present"> 243 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code"> 244 <env key="LANG" value="C"/> 245 <arg value="--version"/> 246 </exec> 247 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system."> 248 <!-- return code not set at all? Most likely svn isn't installed --> 249 <condition> 250 <not> 251 <isset property="svn.exit.code"/> 252 </not> 253 </condition> 254 </fail> 255 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system."> 256 <!-- error code from SVN? Most likely svn is not what we are looking on this system --> 257 <condition> 258 <isfailure code="${svn.exit.code}"/> 259 </condition> 260 </fail> 261 </target> 262 <target name="publish"> 263 <!-- depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist" --> 264 <echo>No normal josm-plugin, publishing over smed !!! 265 1. ant - dist to each subplugin 266 2. ant publish to smed 267 </echo> 268 </target> 295 269 </project> 296
Note:
See TracChangeset
for help on using the changeset viewer.
