Changeset 26174 in osm for applications/editors/josm/plugins/alignways
- Timestamp:
- 2011-06-25T19:02:31+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/alignways
- Files:
-
- 31 added
- 1 edited
-
build.xml (modified) (2 diffs)
-
data (added)
-
data/ar.lang (added)
-
data/bg.lang (added)
-
data/cs.lang (added)
-
data/da.lang (added)
-
data/de.lang (added)
-
data/el.lang (added)
-
data/en.lang (added)
-
data/en_AU.lang (added)
-
data/en_GB.lang (added)
-
data/es.lang (added)
-
data/et.lang (added)
-
data/eu.lang (added)
-
data/fi.lang (added)
-
data/fr.lang (added)
-
data/gl.lang (added)
-
data/he.lang (added)
-
data/is.lang (added)
-
data/it.lang (added)
-
data/ja.lang (added)
-
data/nb.lang (added)
-
data/nl.lang (added)
-
data/pl.lang (added)
-
data/pt_BR.lang (added)
-
data/ru.lang (added)
-
data/sk.lang (added)
-
data/sv.lang (added)
-
data/tr.lang (added)
-
data/uk.lang (added)
-
data/zh_CN.lang (added)
-
data/zh_TW.lang (added)
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/alignways/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 a template build file for a JOSM plugin. … … 29 29 --> 30 30 <project name="alignways" default="dist" basedir="."> 31 <!-- enter the SVN commit message --> 32 <property name="commit.message" value="fix shortcut conflict"/> 33 <!-- 34 enter the *lowest* JOSM version this plugin is currently compatible 35 with 36 --> 37 <property name="plugin.main.version" value="3835"/> 38 <!-- 39 ************************************************ ** should not be 40 necessary to change the following properties 41 --> 42 <property name="josm" location="../../core/dist/josm-custom.jar"/> 43 <property name="plugin.build.dir" value="build"/> 44 <property name="plugin.src.dir" value="src"/> 45 <property name="plugin.lib.dir" value="lib"/> 46 <!-- this is the directory where the plugin jar is copied to --> 47 <property name="plugin.dist.dir" value="../../dist"/> 48 <property name="ant.build.javac.target" value="1.5"/> 49 <property name="plugin.dist.dir" value="../../dist"/> 50 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 51 <!-- 52 ********************************************************** ** init - 53 initializes the build 54 ********************************************************** 55 --> 56 <target name="init"> 57 <mkdir dir="${plugin.build.dir}"/> 58 </target> 59 <!-- 60 ********************************************************** ** compile 61 - complies the source tree 62 ********************************************************** 63 --> 64 <target name="compile" depends="init"> 65 <echo message="compiling sources for ${plugin.jar} ... "/> 66 <javac srcdir="src" classpath="${josm};${plugin.lib.dir}" debug="true" destdir="${plugin.build.dir}"> 67 <compilerarg value="-Xlint:deprecation"/> 68 <compilerarg value="-Xlint:unchecked"/> 69 </javac> 70 <copy todir="${plugin.build.dir}"> 71 <fileset dir="lib"/> 72 </copy> 73 </target> 74 <!-- 75 ********************************************************** ** dist - 76 creates the plugin jar 77 ********************************************************** 78 --> 79 <target name="dist" depends="compile,revision"> 80 <echo message="creating ${ant.project.name}.jar ... "/> 81 <copy todir="${plugin.build.dir}/resources"> 82 <fileset dir="resources"/> 83 </copy> 84 <copy todir="${plugin.build.dir}/images"> 85 <fileset dir="images"/> 86 </copy> 87 <copy todir="${plugin.build.dir}/data"> 88 <fileset dir="data"/> 89 </copy> 90 <copy todir="${plugin.build.dir}"> 91 <fileset dir="."> 92 <include name="README"/> 93 <include name="LICENSE"/> 94 </fileset> 95 </copy> 96 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 97 <!-- 98 ************************************************ ** configure these 99 properties. Most of them will be copied to the plugins ** manifest 100 file. Property values will also show up in the list available ** 101 plugins: http://josm.openstreetmap.de/wiki/Plugins. ** 102 ************************************************ 103 --> 104 <manifest> 105 <attribute name="Author" value="Attila Szász"/> 106 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.alignways.AlignWaysPlugin"/> 107 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 108 <attribute name="Plugin-Description" value="Makes a pair of selected way segments parallel by rotating one of them around a chosen pivot."/> 109 <attribute name="Plugin-Icon" value="images/alignways.png"/> 110 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 111 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 112 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/AlignWayS"/> 113 </manifest> 114 </jar> 115 </target> 116 <!-- 117 ********************************************************** ** revision 118 - extracts the current revision number for the ** file build.number 119 and stores it in the XML property ** version.* 120 ********************************************************** 121 --> 122 <target name="revision"> 123 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 124 <env key="LANG" value="C"/> 125 <arg value="info"/> 126 <arg value="--xml"/> 127 <arg value="."/> 128 </exec> 129 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 130 <delete file="REVISION"/> 131 </target> 132 <!-- 133 ********************************************************** ** clean - 134 clean up the build environment 135 ********************************************************** 136 --> 137 <target name="clean"> 138 <delete dir="${plugin.build.dir}"/> 139 <delete file="${plugin.jar}"/> 140 </target> 141 <!-- 142 ********************************************************** ** install 143 - install the plugin in your local JOSM installation 144 ********************************************************** 145 --> 146 <target name="install" depends="dist"> 147 <property environment="env"/> 148 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 149 <and> 150 <os family="windows"/> 151 </and> 152 </condition> 153 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 154 </target> 155 <!-- 156 ************************** Publishing the plugin 157 *********************************** 158 --> 159 <!-- 160 ** extracts the JOSM release for the JOSM version in ../core and saves 161 it in the ** property ${coreversion.info.entry.revision} ** 162 --> 163 <target name="core-info"> 164 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> 165 <env key="LANG" value="C"/> 166 <arg value="info"/> 167 <arg value="--xml"/> 168 <arg value="../../core"/> 169 </exec> 170 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/> 171 <echo>Building against core revision 172 ${coreversion.info.entry.revision}.</echo> 173 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 174 <delete file="core.info.xml"/> 175 </target> 176 <!-- 177 ** commits the source tree for this plugin 178 --> 179 <target name="commit-current"> 180 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 181 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 182 <env key="LANG" value="C"/> 183 <arg value="commit"/> 184 <arg value="-m '${commit.message}'"/> 185 <arg value="."/> 186 </exec> 187 </target> 188 <!-- 189 ** updates (svn up) the source tree for this plugin 190 --> 191 <target name="update-current"> 192 <echo>Updating plugin source ...</echo> 193 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 194 <env key="LANG" value="C"/> 195 <arg value="up"/> 196 <arg value="."/> 197 </exec> 198 <echo>Updating ${plugin.jar} ...</echo> 199 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 200 <env key="LANG" value="C"/> 201 <arg value="up"/> 202 <arg value="../dist/${plugin.jar}"/> 203 </exec> 204 </target> 205 <!-- 206 ** commits the plugin.jar 207 --> 208 <target name="commit-dist"> 209 <echo> 210 ***** Properties of published ${plugin.jar} ***** 211 Commit message 212 : '${commit.message}' 213 Plugin-Mainversion: ${plugin.main.version} 214 JOSM 215 build version: ${coreversion.info.entry.revision} 216 Plugin-Version : 217 ${version.entry.commit.revision} 218 ***** / Properties of published 219 ${plugin.jar} ***** 31 220 32 <!-- enter the SVN commit message --> 33 <property name="commit.message" value="fix shortcut conflict" /> 34 <!-- 35 enter the *lowest* JOSM version this plugin is currently compatible 36 with 37 --> 38 <property name="plugin.main.version" value="3835" /> 39 40 41 <!-- 42 ************************************************ ** should not be 43 necessary to change the following properties 44 --> 45 <property name="josm" location="../../core/dist/josm-custom.jar" /> 46 <property name="plugin.build.dir" value="build" /> 47 <property name="plugin.src.dir" value="src" /> 48 <property name="plugin.lib.dir" value="lib" /> 49 <!-- this is the directory where the plugin jar is copied to --> 50 <property name="plugin.dist.dir" value="../../dist" /> 51 <property name="ant.build.javac.target" value="1.5" /> 52 <property name="plugin.dist.dir" value="../../dist" /> 53 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar" /> 54 55 <!-- 56 ********************************************************** ** init - 57 initializes the build 58 ********************************************************** 59 --> 60 <target name="init"> 61 <mkdir dir="${plugin.build.dir}" /> 62 </target> 63 64 <!-- 65 ********************************************************** ** compile 66 - complies the source tree 67 ********************************************************** 68 --> 69 <target name="compile" depends="init"> 70 <echo message="compiling sources for ${plugin.jar} ... " /> 71 <javac srcdir="src" classpath="${josm};${plugin.lib.dir}" debug="true" 72 destdir="${plugin.build.dir}"> 73 <compilerarg value="-Xlint:deprecation" /> 74 <compilerarg value="-Xlint:unchecked" /> 75 </javac> 76 <copy todir="${plugin.build.dir}"> 77 <fileset dir="lib" /> 78 </copy> 79 </target> 80 81 <!-- 82 ********************************************************** ** dist - 83 creates the plugin jar 84 ********************************************************** 85 --> 86 <target name="dist" depends="compile,revision"> 87 <echo message="creating ${ant.project.name}.jar ... " /> 88 <copy todir="${plugin.build.dir}/resources"> 89 <fileset dir="resources" /> 90 </copy> 91 <copy todir="${plugin.build.dir}/images"> 92 <fileset dir="images" /> 93 </copy> 94 <copy todir="${plugin.build.dir}"> 95 <fileset dir="."> 96 <include name="README" /> 97 <include name="LICENSE" /> 98 </fileset> 99 </copy> 100 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 101 <!-- 102 ************************************************ ** configure these 103 properties. Most of them will be copied to the plugins ** manifest 104 file. Property values will also show up in the list available ** 105 plugins: http://josm.openstreetmap.de/wiki/Plugins. ** 106 ************************************************ 107 --> 108 <manifest> 109 <attribute name="Author" value="Attila Szász" /> 110 <attribute name="Plugin-Class" 111 value="org.openstreetmap.josm.plugins.alignways.AlignWaysPlugin" /> 112 <attribute name="Plugin-Date" value="${version.entry.commit.date}" /> 113 <attribute name="Plugin-Description" 114 value="Makes a pair of selected way segments parallel by rotating one of them around a chosen pivot." /> 115 <attribute name="Plugin-Icon" value="images/alignways.png"/> 116 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" /> 117 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" /> 118 <attribute name="Plugin-Link" 119 value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/AlignWayS" /> 120 </manifest> 121 </jar> 122 </target> 123 124 <!-- 125 ********************************************************** ** revision 126 - extracts the current revision number for the ** file build.number 127 and stores it in the XML property ** version.* 128 ********************************************************** 129 --> 130 <target name="revision"> 131 132 <exec append="false" output="REVISION" executable="svn" 133 failifexecutionfails="false"> 134 <env key="LANG" value="C" /> 135 <arg value="info" /> 136 <arg value="--xml" /> 137 <arg value="." /> 138 </exec> 139 <xmlproperty file="REVISION" prefix="version" keepRoot="false" 140 collapseAttributes="true" /> 141 <delete file="REVISION" /> 142 </target> 143 144 <!-- 145 ********************************************************** ** clean - 146 clean up the build environment 147 ********************************************************** 148 --> 149 <target name="clean"> 150 <delete dir="${plugin.build.dir}" /> 151 <delete file="${plugin.jar}" /> 152 </target> 153 154 <!-- 155 ********************************************************** ** install 156 - install the plugin in your local JOSM installation 157 ********************************************************** 158 --> 159 <target name="install" depends="dist"> 160 <property environment="env" /> 161 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" 162 else="${user.home}/.josm/plugins"> 163 <and> 164 <os family="windows" /> 165 </and> 166 </condition> 167 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" /> 168 </target> 169 170 171 <!-- 172 ************************** Publishing the plugin 173 *********************************** 174 --> 175 <!-- 176 ** extracts the JOSM release for the JOSM version in ../core and saves 177 it in the ** property ${coreversion.info.entry.revision} ** 178 --> 179 <target name="core-info"> 180 <exec append="false" output="core.info.xml" executable="svn" 181 failifexecutionfails="false"> 182 <env key="LANG" value="C" /> 183 <arg value="info" /> 184 <arg value="--xml" /> 185 <arg value="../../core" /> 186 </exec> 187 <xmlproperty file="core.info.xml" prefix="coreversion" 188 keepRoot="true" collapseAttributes="true" /> 189 <echo>Building against core revision 190 ${coreversion.info.entry.revision}.</echo> 191 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 192 <delete file="core.info.xml" /> 193 </target> 194 195 <!-- 196 ** commits the source tree for this plugin 197 --> 198 <target name="commit-current"> 199 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 200 <exec append="true" output="svn.log" executable="svn" 201 failifexecutionfails="false"> 202 <env key="LANG" value="C" /> 203 <arg value="commit" /> 204 <arg value="-m '${commit.message}'" /> 205 <arg value="." /> 206 </exec> 207 </target> 208 209 <!-- 210 ** updates (svn up) the source tree for this plugin 211 --> 212 <target name="update-current"> 213 <echo>Updating plugin source ...</echo> 214 <exec append="true" output="svn.log" executable="svn" 215 failifexecutionfails="false"> 216 <env key="LANG" value="C" /> 217 <arg value="up" /> 218 <arg value="." /> 219 </exec> 220 <echo>Updating ${plugin.jar} ...</echo> 221 <exec append="true" output="svn.log" executable="svn" 222 failifexecutionfails="false"> 223 <env key="LANG" value="C" /> 224 <arg value="up" /> 225 <arg value="../dist/${plugin.jar}" /> 226 </exec> 227 </target> 228 229 <!-- 230 ** commits the plugin.jar 231 --> 232 <target name="commit-dist"> 233 <echo> 234 ***** Properties of published ${plugin.jar} ***** 235 Commit message 236 : '${commit.message}' 237 Plugin-Mainversion: ${plugin.main.version} 238 JOSM 239 build version: ${coreversion.info.entry.revision} 240 Plugin-Version : 241 ${version.entry.commit.revision} 242 ***** / Properties of published 243 ${plugin.jar} ***** 244 245 Now commiting ${plugin.jar} ... 246 </echo> 247 <exec append="true" output="svn.log" executable="svn" 248 failifexecutionfails="false"> 249 <env key="LANG" value="C" /> 250 <arg value="-m '${commit.message}'" /> 251 <arg value="commit" /> 252 <arg value="${plugin.jar}" /> 253 </exec> 254 </target> 255 256 <!-- ** make sure svn is present as a command line tool ** --> 257 <target name="ensure-svn-present"> 258 <exec append="true" output="svn.log" executable="svn" 259 failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code"> 260 <env key="LANG" value="C" /> 261 <arg value="--version" /> 262 </exec> 263 <fail 264 message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system."> 265 <!-- return code not set at all? Most likely svn isn't installed --> 266 <condition> 267 <not> 268 <isset property="svn.exit.code" /> 269 </not> 270 </condition> 271 </fail> 272 <fail 273 message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system."> 274 <!-- 275 error code from SVN? Most likely svn is not what we are looking on 276 this system 277 --> 278 <condition> 279 <isfailure code="${svn.exit.code}" /> 280 </condition> 281 </fail> 282 </target> 283 284 <target name="publish" 285 depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist"> 286 </target> 221 Now commiting ${plugin.jar} ... 222 </echo> 223 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 224 <env key="LANG" value="C"/> 225 <arg value="-m '${commit.message}'"/> 226 <arg value="commit"/> 227 <arg value="${plugin.jar}"/> 228 </exec> 229 </target> 230 <!-- ** make sure svn is present as a command line tool ** --> 231 <target name="ensure-svn-present"> 232 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code"> 233 <env key="LANG" value="C"/> 234 <arg value="--version"/> 235 </exec> 236 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system."> 237 <!-- return code not set at all? Most likely svn isn't installed --> 238 <condition> 239 <not> 240 <isset property="svn.exit.code"/> 241 </not> 242 </condition> 243 </fail> 244 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system."> 245 <!-- 246 error code from SVN? Most likely svn is not what we are looking on 247 this system 248 --> 249 <condition> 250 <isfailure code="${svn.exit.code}"/> 251 </condition> 252 </fail> 253 </target> 254 <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist"> 255 </target> 287 256 </project>
Note:
See TracChangeset
for help on using the changeset viewer.
