Changeset 26174 in osm for applications/editors/josm/plugins/00_plugin_dir_template/build.xml
- Timestamp:
- 2011-06-25T19:02:31+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/00_plugin_dir_template/build.xml
r23263 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="myPluginName" default="dist" basedir="."> 31 32 31 <!-- enter the SVN commit message --> 33 <property name="commit.message" value="Commit message" 32 <property name="commit.message" value="Commit message"/> 34 33 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 <property name="plugin.main.version" value="" /> 36 37 38 <!-- 39 ************************************************ 40 ** should not be 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"/> 34 <property name="plugin.main.version" value=""/> 35 <!-- should not be necessary to change the following properties --> 36 <property name="josm" location="../../core/dist/josm-custom.jar"/> 37 <property name="plugin.build.dir" value="build"/> 38 <property name="plugin.src.dir" value="src"/> 45 39 <!-- this is the directory where the plugin jar is copied to --> 46 <property name="plugin.dist.dir" 40 <property name="plugin.dist.dir" value="../../dist"/> 47 41 <property name="ant.build.javac.target" value="1.5"/> 48 <property name="plugin.dist.dir" value="../../dist"/> 49 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 50 42 <property name="plugin.dist.dir" value="../../dist"/> 43 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 51 44 <!-- 52 45 ********************************************************** … … 57 50 <mkdir dir="${plugin.build.dir}"/> 58 51 </target> 59 60 52 <!-- 61 53 ********************************************************** … … 70 62 </javac> 71 63 </target> 72 73 64 <!-- 74 65 ********************************************************** … … 84 75 <fileset dir="images"/> 85 76 </copy> 77 <copy todir="${plugin.build.dir}/data"> 78 <fileset dir="data"/> 79 </copy> 86 80 <copy todir="${plugin.build.dir}"> 87 81 <fileset dir="."> 88 <include name="README" 89 <include name="LICENSE" 82 <include name="README"/> 83 <include name="LICENSE"/> 90 84 </fileset> 91 85 </copy> 92 86 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 93 87 <!-- 94 ************************************************ 95 ** configure these properties. Most of them will be copied to the plugins 96 ** manifest file. Property values will also show up in the list available 97 ** plugins: http://josm.openstreetmap.de/wiki/Plugins. 98 ** 99 ************************************************ 100 --> 88 ************************************************ 89 ** configure these properties. Most of them will be copied to the plugins 90 ** manifest file. Property values will also show up in the list available 91 ** plugins: http://josm.openstreetmap.de/wiki/Plugins. 92 ** 93 ************************************************ 94 --> 101 95 <manifest> 102 96 <attribute name="Author" value="..."/> … … 111 105 </jar> 112 106 </target> 113 114 107 <!-- 115 108 ********************************************************** … … 120 113 --> 121 114 <target name="revision"> 122 123 115 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 124 116 <env key="LANG" value="C"/> … … 130 122 <delete file="REVISION"/> 131 123 </target> 132 133 124 <!-- 134 125 ********************************************************** … … 140 131 <delete file="${plugin.jar}"/> 141 132 </target> 142 143 133 <!-- 144 134 ********************************************************** … … 155 145 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 156 146 </target> 157 158 159 147 <!-- 160 148 ************************** Publishing the plugin *********************************** 161 149 --> 162 150 <!-- 163 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 164 ** property ${coreversion.info.entry.revision} 165 ** 166 --> 151 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 152 ** property ${coreversion.info.entry.revision} 153 --> 167 154 <target name="core-info"> 168 155 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> … … 175 162 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 176 163 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 177 <delete file="core.info.xml" /> 178 </target> 179 180 <!-- 181 ** commits the source tree for this plugin 182 --> 164 <delete file="core.info.xml"/> 165 </target> 166 <!-- commits the source tree for this plugin --> 183 167 <target name="commit-current"> 184 168 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> … … 190 174 </exec> 191 175 </target> 192 193 <!-- 194 ** updates (svn up) the source tree for this plugin 195 --> 176 <!-- updates (svn up) the source tree for this plugin --> 196 177 <target name="update-current"> 197 178 <echo>Updating plugin source ...</echo> … … 208 189 </exec> 209 190 </target> 210 211 <!-- 212 ** commits the plugin.jar 213 --> 191 <!-- commits the plugin.jar --> 214 192 <target name="commit-dist"> 215 193 <echo> … … 230 208 </exec> 231 209 </target> 232 233 <!-- ** make sure svn is present as a command line tool ** --> 210 <!-- make sure svn is present as a command line tool --> 234 211 <target name="ensure-svn-present"> 235 212 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code"> 236 <env key="LANG" value="C" 237 <arg value="--version" 213 <env key="LANG" value="C"/> 214 <arg value="--version"/> 238 215 </exec> 239 216 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system."> … … 241 218 <condition> 242 219 <not> 243 <isset property="svn.exit.code" 220 <isset property="svn.exit.code"/> 244 221 </not> 245 222 </condition> … … 248 225 <!-- error code from SVN? Most likely svn is not what we are looking on this system --> 249 226 <condition> 250 <isfailure code="${svn.exit.code}" 227 <isfailure code="${svn.exit.code}"/> 251 228 </condition> 252 229 </fail> 253 230 </target> 254 255 231 <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist"> 256 232 </target>
Note:
See TracChangeset
for help on using the changeset viewer.