Changeset 26174 in osm for applications/editors/josm/plugins/trustosm
- Timestamp:
- 2011-06-25T19:02:31+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/trustosm
- Files:
-
- 31 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/trustosm/build.xml
r26056 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="trustosm" default="dist" basedir="."> 31 32 <!-- enter the SVN commit message --> 33 <property name="commit.message" value="New plugin for digital signing osm data" /> 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 <property name="plugin.main.version" value="3329" /> 36 37 31 <!-- enter the SVN commit message --> 32 <property name="commit.message" value="New plugin for digital signing osm data"/> 33 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 34 <property name="plugin.main.version" value="3329"/> 38 35 <!-- 39 36 ************************************************ 40 37 ** should not be necessary to change the following properties 41 38 --> 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.6"/> 49 <property name="plugin.dist.dir" value="../../dist"/> 50 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 51 39 <property name="josm" location="../../core/dist/josm-custom.jar"/> 40 <property name="plugin.build.dir" value="build"/> 41 <property name="plugin.src.dir" value="src"/> 42 <property name="plugin.lib.dir" value="lib"/> 43 <!-- this is the directory where the plugin jar is copied to --> 44 <property name="plugin.dist.dir" value="../../dist"/> 45 <property name="ant.build.javac.target" value="1.6"/> 46 <property name="plugin.dist.dir" value="../../dist"/> 47 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 52 48 <!-- 53 49 ********************************************************** … … 58 54 <mkdir dir="${plugin.build.dir}"/> 59 55 </target> 60 61 56 <!-- 62 57 ********************************************************** … … 64 59 ********************************************************** 65 60 --> 66 <target name="compile" depends="init"> 67 <echo message="compiling sources for ${plugin.jar} ... "/> 68 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}"> 69 <compilerarg value="-Xlint:deprecation"/> 70 <compilerarg value="-Xlint:unchecked"/> 71 <classpath> 72 <pathelement location="${josm}"/> 73 <fileset dir="${plugin.lib.dir}"> 74 <include name="**/*.jar"/> 75 </fileset> 76 </classpath> 77 </javac> 78 </target> 79 80 81 <!-- create a property containing all .jar files, prefix lib/, and seperated with a space --> 82 <pathconvert property="libs.project" pathsep=" "> 83 <mapper> 84 <chainedmapper> 85 86 <!-- remove absolute path --> 87 <flattenmapper /> 88 89 <!-- add lib/ prefix --> 90 <globmapper from="*" to="${ant.project.name}/lib/*" /> 91 </chainedmapper> 92 </mapper> 93 94 <path> 95 96 <!-- plugin.lib.dir contains all jar files --> 97 <fileset dir="${plugin.lib.dir}"> 98 <include name="**/*.jar" /> 99 </fileset> 100 </path> 101 </pathconvert> 102 103 104 <!-- 61 <target name="compile" depends="init"> 62 <echo message="compiling sources for ${plugin.jar} ... "/> 63 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}"> 64 <compilerarg value="-Xlint:deprecation"/> 65 <compilerarg value="-Xlint:unchecked"/> 66 <classpath> 67 <pathelement location="${josm}"/> 68 <fileset dir="${plugin.lib.dir}"> 69 <include name="**/*.jar"/> 70 </fileset> 71 </classpath> 72 </javac> 73 </target> 74 <!-- create a property containing all .jar files, prefix lib/, and seperated with a space --> 75 <pathconvert property="libs.project" pathsep=" "> 76 <mapper> 77 <chainedmapper> 78 <!-- remove absolute path --> 79 <flattenmapper/> 80 <!-- add lib/ prefix --> 81 <globmapper from="*" to="${ant.project.name}/lib/*"/> 82 </chainedmapper> 83 </mapper> 84 <path> 85 <!-- plugin.lib.dir contains all jar files --> 86 <fileset dir="${plugin.lib.dir}"> 87 <include name="**/*.jar"/> 88 </fileset> 89 </path> 90 </pathconvert> 91 <!-- 105 92 ********************************************************** 106 93 ** dist - creates the plugin jar 107 94 ********************************************************** 108 95 --> 109 <target name="dist" depends="compile,revision"> 110 <echo message="creating ${ant.project.name}.jar ... "/> 111 <copy todir="${plugin.build.dir}/lib"> 112 <fileset dir="${plugin.lib.dir}"/> 113 </copy> 114 <copy todir="${plugin.build.dir}/resources"> 115 <fileset dir="resources"/> 116 </copy> 117 <copy todir="${plugin.build.dir}/images"> 118 <fileset dir="images"/> 119 </copy> 120 <copy todir="${plugin.build.dir}"> 121 <fileset dir="."> 122 <include name="README" /> 123 <include name="LICENSE" /> 124 </fileset> 125 </copy> 126 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 127 <!-- 96 <target name="dist" depends="compile,revision"> 97 <echo message="creating ${ant.project.name}.jar ... "/> 98 <copy todir="${plugin.build.dir}/lib"> 99 <fileset dir="${plugin.lib.dir}"/> 100 </copy> 101 <copy todir="${plugin.build.dir}/resources"> 102 <fileset dir="resources"/> 103 </copy> 104 <copy todir="${plugin.build.dir}/images"> 105 <fileset dir="images"/> 106 </copy> 107 <copy todir="${plugin.build.dir}/data"> 108 <fileset dir="data"/> 109 </copy> 110 <copy todir="${plugin.build.dir}"> 111 <fileset dir="."> 112 <include name="README"/> 113 <include name="LICENSE"/> 114 </fileset> 115 </copy> 116 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 117 <!-- 128 118 ************************************************ 129 119 ** configure these properties. Most of them will be copied to the plugins … … 133 123 ************************************************ 134 124 --> 135 <manifest> 136 <attribute name="Author" value="Christoph Wagner"/> 137 <attribute name="Class-Path" value="${libs.project}" /> 138 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.trustosm.TrustOSMplugin"/> 139 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 140 <attribute name="Plugin-Description" value="Plugin to digital sign OSM-Data"/> 141 <attribute name="Plugin-Icon" value="trustosm"/> 142 <attribute name="Plugin-Link" value="..."/> 143 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 144 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 145 </manifest> 146 </jar> 147 </target> 148 125 <manifest> 126 <attribute name="Author" value="Christoph Wagner"/> 127 <attribute name="Class-Path" value="${libs.project}"/> 128 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.trustosm.TrustOSMplugin"/> 129 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 130 <attribute name="Plugin-Description" value="Plugin to digital sign OSM-Data"/> 131 <attribute name="Plugin-Icon" value="trustosm"/> 132 <attribute name="Plugin-Link" value="..."/> 133 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 134 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 135 </manifest> 136 </jar> 137 </target> 149 138 <!-- 150 139 ********************************************************** … … 155 144 --> 156 145 <target name="revision"> 157 158 146 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 159 147 <env key="LANG" value="C"/> … … 165 153 <delete file="REVISION"/> 166 154 </target> 167 168 155 <!-- 169 156 ********************************************************** … … 175 162 <delete file="${plugin.jar}"/> 176 163 </target> 177 178 164 <!-- 179 165 ********************************************************** … … 190 176 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 191 177 </target> 192 193 194 178 <!-- 195 179 ************************** Publishing the plugin *********************************** … … 210 194 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 211 195 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 212 <delete file="core.info.xml" /> 213 </target> 214 196 <delete file="core.info.xml"/> 197 </target> 215 198 <!-- 216 199 ** commits the source tree for this plugin … … 225 208 </exec> 226 209 </target> 227 228 210 <!-- 229 211 ** updates (svn up) the source tree for this plugin … … 243 225 </exec> 244 226 </target> 245 246 227 <!-- 247 228 ** commits the plugin.jar … … 265 246 </exec> 266 247 </target> 267 268 248 <!-- ** make sure svn is present as a command line tool ** --> 269 249 <target name="ensure-svn-present"> 270 250 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code"> 271 <env key="LANG" value="C" 272 <arg value="--version" 251 <env key="LANG" value="C"/> 252 <arg value="--version"/> 273 253 </exec> 274 254 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system."> … … 276 256 <condition> 277 257 <not> 278 <isset property="svn.exit.code" 258 <isset property="svn.exit.code"/> 279 259 </not> 280 260 </condition> … … 283 263 <!-- error code from SVN? Most likely svn is not what we are looking on this system --> 284 264 <condition> 285 <isfailure code="${svn.exit.code}" 265 <isfailure code="${svn.exit.code}"/> 286 266 </condition> 287 267 </fail> 288 268 </target> 289 290 269 <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist"> 291 270 </target>
Note:
See TracChangeset
for help on using the changeset viewer.