Changeset 29778 in osm for applications/editors/josm/plugins/addrinterpolation/build.xml
- Timestamp:
- 2013-07-25T21:57:38+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/addrinterpolation/build.xml
r29435 r29778 22 22 --> 23 23 <project name="AddrInterpolation" default="dist" basedir="."> 24 <!-- enter the SVN commit message --> 24 25 <property name="commit.message" value="Impoved Icon"/> 25 <property name="plugin.main.version" value="5053"/> 26 <!-- 27 ************************************************ 28 ** should not be necessary to change the following properties 29 --> 30 <property name="josm" location="../../core/dist/josm-custom.jar"/> 31 <property name="plugin.build.dir" value="build"/> 32 <property name="plugin.src.dir" value="src"/> 33 <!-- this is the directory where the plugin jar is copied to --> 34 <property name="plugin.dist.dir" value="../../dist"/> 35 <property name="ant.build.javac.target" value="1.5"/> 36 <property name="plugin.dist.dir" value="../../dist"/> 37 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 38 <!-- 39 ********************************************************** 40 ** init - initializes the build 41 ********************************************************** 26 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 27 <property name="plugin.main.version" value="6082"/> 28 29 <!-- Configure these properties (replace "..." accordingly). 30 See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins 42 31 --> 43 <target name="init"> 44 <mkdir dir="${plugin.build.dir}"/> 45 </target> 46 <!-- 47 ********************************************************** 48 ** compile - complies the source tree 49 ********************************************************** 50 --> 51 <target name="compile" depends="init"> 52 <echo message="compiling sources for ${plugin.jar} ... "/> 53 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}"> 54 <compilerarg value="-Xlint:deprecation"/> 55 <compilerarg value="-Xlint:unchecked"/> 56 </javac> 57 </target> 58 <!-- 59 ********************************************************** 60 ** dist - creates the plugin jar 61 ********************************************************** 62 --> 63 <target name="dist" depends="compile,revision"> 64 <echo message="creating ${plugin.jar} ... "/> 65 <copy todir="${plugin.build.dir}/resources"> 66 <fileset dir="resources"/> 67 </copy> 68 <copy todir="${plugin.build.dir}/images"> 69 <fileset dir="images"/> 70 </copy> 71 <copy todir="${plugin.build.dir}/data"> 72 <fileset dir="data"/> 73 </copy> 74 <copy todir="${plugin.build.dir}"> 75 <fileset dir="."> 76 <include name="README"/> 77 <include name="LICENSE"/> 78 </fileset> 79 </copy> 80 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 81 <!-- 82 ************************************************ 83 ** configure these properties. Most of them will be copied to the plugins 84 ** manifest file. Property values will also show up in the list available 85 ** plugins: http://josm.openstreetmap.de/wiki/Plugins. 86 ** 87 ************************************************ 88 --> 89 <manifest> 90 <attribute name="Author" value="Mike Nice"/> 91 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.AddrInterpolation.AddrInterpolationPlugin"/> 92 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 93 <attribute name="Plugin-Description" value="Group common Address Interpolation inputs in a single dialog, as well as an option to automatically generate individual house number nodes from a Way."/> 94 <attribute name="Plugin-Icon" value="images/AddrInterpolation.png"/> 95 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/AddrInterpolation"/> 96 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 97 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 98 </manifest> 99 </jar> 100 </target> 101 <!-- 102 ********************************************************** 103 ** revision - extracts the current revision number for the 104 ** file build.number and stores it in the XML property 105 ** version.* 106 ********************************************************** 107 --> 108 <target name="revision"> 109 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 110 <env key="LANG" value="C"/> 111 <arg value="info"/> 112 <arg value="--xml"/> 113 <arg value="."/> 114 </exec> 115 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 116 <delete file="REVISION"/> 117 </target> 118 <!-- 119 ********************************************************** 120 ** clean - clean up the build environment 121 ********************************************************** 122 --> 123 <target name="clean"> 124 <delete dir="${plugin.build.dir}"/> 125 <delete file="${plugin.jar}"/> 126 </target> 127 <!-- 128 ********************************************************** 129 ** install - install the plugin in your local JOSM installation 130 ********************************************************** 131 --> 132 <target name="install" depends="dist"> 133 <property environment="env"/> 134 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 135 <and> 136 <os family="windows"/> 137 </and> 138 </condition> 139 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 140 </target> 141 <!-- 142 ************************** Publishing the plugin *********************************** 143 --> 144 <!-- 145 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 146 ** property ${coreversion.info.entry.revision} 147 ** 148 --> 149 <target name="core-info"> 150 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> 151 <env key="LANG" value="C"/> 152 <arg value="info"/> 153 <arg value="--xml"/> 154 <arg value="../../core"/> 155 </exec> 156 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/> 157 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 158 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 159 <delete file="core.info.xml"/> 160 </target> 161 <!-- 162 ** commits the source tree for this plugin 163 --> 164 <target name="commit-current"> 165 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 166 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 167 <env key="LANG" value="C"/> 168 <arg value="commit"/> 169 <arg value="-m '${commit.message}'"/> 170 <arg value="."/> 171 </exec> 172 </target> 173 <!-- 174 ** updates (svn up) the source tree for this plugin 175 --> 176 <target name="update-current"> 177 <echo>Updating plugin source ...</echo> 178 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 179 <env key="LANG" value="C"/> 180 <arg value="up"/> 181 <arg value="."/> 182 </exec> 183 <echo>Updating ${plugin.jar} ...</echo> 184 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 185 <env key="LANG" value="C"/> 186 <arg value="up"/> 187 <arg value="../dist/${plugin.jar}"/> 188 </exec> 189 </target> 190 <!-- 191 ** commits the plugin.jar 192 --> 193 <target name="commit-dist"> 194 <echo> 195 ***** Properties of published ${plugin.jar} ***** 196 Commit message : '${commit.message}' 197 Plugin-Mainversion: ${plugin.main.version} 198 JOSM build version: ${coreversion.info.entry.revision} 199 Plugin-Version : ${version.entry.commit.revision} 200 ***** / Properties of published ${plugin.jar} ***** 201 202 Now commiting ${plugin.jar} ... 203 </echo> 204 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 205 <env key="LANG" value="C"/> 206 <arg value="-m '${commit.message}'"/> 207 <arg value="commit"/> 208 <arg value="${plugin.jar}"/> 209 </exec> 210 </target> 211 <!-- ** make sure svn is present as a command line tool ** --> 212 <target name="ensure-svn-present"> 213 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code"> 214 <env key="LANG" value="C"/> 215 <arg value="--version"/> 216 </exec> 217 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system."> 218 <!-- return code not set at all? Most likely svn isn't installed --> 219 <condition> 220 <not> 221 <isset property="svn.exit.code"/> 222 </not> 223 </condition> 224 </fail> 225 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system."> 226 <!-- error code from SVN? Most likely svn is not what we are looking on this system --> 227 <condition> 228 <isfailure code="${svn.exit.code}"/> 229 </condition> 230 </fail> 231 </target> 232 <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist"> 233 </target> 32 <property name="plugin.author" value="Mike Nice"/> 33 <property name="plugin.class" value="org.openstreetmap.josm.plugins.AddrInterpolation.AddrInterpolationPlugin"/> 34 <property name="plugin.description" value="Group common Address Interpolation inputs in a single dialog, as well as an option to automatically generate individual house number nodes from a Way."/> 35 <property name="plugin.icon" value="images/AddrInterpolation.png"/> 36 <property name="plugin.link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/AddrInterpolation"/> 37 38 <!-- ** include targets that all plugins have in common ** --> 39 <import file="../build-common.xml"/> 234 40 </project>
Note:
See TracChangeset
for help on using the changeset viewer.