Changeset 14429 in osm for applications/editors/josm
- Timestamp:
- 2009-04-08T11:53:12+02:00 (16 years ago)
- Location:
- applications/editors/josm/plugins/tageditor
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/tageditor/build.xml
r14421 r14429 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!-- 3 ** This is a template build file for a JOSM plugin. 4 ** 5 ** Maintaining versions 6 ** ==================== 7 ** see README.template 8 ** 9 ** Usage 10 ** ===== 11 ** To build it run 12 ** 13 ** > ant dist 14 ** 15 ** To install the generated plugin locally (in you default plugin directory) run 16 ** 17 ** > ant install 18 ** 19 ** The generated plugin jar is not automatically available in JOSMs plugin configuration 20 ** dialog. You have to check it in first. To check in run 21 ** 22 ** > ant publish 23 ** 24 --> 25 <project name="tageditor" default="dist" basedir="."> 26 2 27 3 <project name="tageditor" default="dist" basedir="."> 4 <property name="josm" location="../../core/dist/josm-custom.jar"/> 28 <!-- 29 ************************************************ 30 ** configure these properties. Most of them will be copied to the plugins 31 ** manifest file. Property values will also show up in the list available 32 ** plugins: http://josm.openstreetmap.de/wiki/Plugins. 33 ** 34 ************************************************ 35 --> 36 <property name="plugin.author" value="Karl Guggisberg"/> 37 <property name="plugin.class" value="org.openstreetmap.josm.plugins.tageditor.TagEditorPlugin"/> 38 <property name="plugin.description" value="Provides a dialog for editing tags in a tabular grid."/> 39 <property name="plugin.doc.url" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/TagEditor"/> 40 <property name="plugin.main.version" value="0.7"/> 41 <property name="plugin.jar.name" value="${ant.project.name}.jar"/> 42 43 44 <!-- 45 ************************************************ 46 ** should not be necessary to change the following properties 47 --> 48 <property name="josm" location="../../core/dist/josm-custom.jar"/> 49 <property name="plugin.build.dir" value="build"/> 50 <property name="plugin.src.dir" value="src"/> 51 <!-- this is the directory where the plugin jar is copied to --> 5 52 <property name="plugin.dist.dir" value="../../dist"/> 6 <property name="plugin.build.dir" value="build"/> 7 <property name="plugin.src.dir" value="src"/> 8 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 9 <property name="ant.build.javac.target" value="1.5"/> 10 53 <property name="ant.build.javac.target" value="1.5"/> 54 <property name="plugin.dist.dir" value="../../dist"/> 55 <property name="plugin.jar" value="${plugin.dist.dir}/${plugin.jar.name}"/> 56 57 <!-- 58 ********************************************************** 59 ** init - initializes the build 60 ********************************************************** 61 --> 11 62 <target name="init"> 12 63 <!-- make sure we increment the build number ... --> … … 18 69 <arg value="commit"/> 19 70 <arg value="--message"/> 20 <arg value="inc build number"/> 71 <arg value="increment build number"/> 21 72 <arg value="build.number"/> 22 73 </exec> 23 74 <mkdir dir="${plugin.build.dir}"/> 24 75 </target> 76 77 <!-- 78 ********************************************************** 79 ** compile - complies the source tree 80 ********************************************************** 81 --> 25 82 <target name="compile" depends="init"> 26 <echo message="c reating${plugin.jar}"/>83 <echo message="compiling sources for ${plugin.jar.name} ... "/> 27 84 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}"> 28 85 <compilerarg value="-Xlint:deprecation"/> … … 30 87 </javac> 31 88 </target> 32 <target name="dist" depends="compile,revision"> 33 <copy todir="${plugin.build.dir}/resources"> 89 90 <!-- 91 ********************************************************** 92 ** dist - creates the plugin jar 93 ********************************************************** 94 --> 95 <target name="dist" depends="compile,revision"> 96 <echo message="creating ${plugin.jar.name} ... "/> 97 <copy todir="${plugin.build.dir}/resources"> 34 98 <fileset dir="resources"/> 99 </copy> 100 <copy todir="${plugin.build.dir}"> 101 <fileset dir="."> 102 <include name="README" /> 103 <include name="LICENSE" /> 104 </fileset> 35 105 </copy> 36 106 <copy todir="${plugin.build.dir}"> … … 39 109 </fileset> 40 110 </copy> 41 111 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 42 112 <manifest> 43 <attribute name="Author" value=" Karl Guggisberg"/>44 <attribute name="Plugin-Class" value=" org.openstreetmap.josm.plugins.tageditor.TagEditorPlugin"/>113 <attribute name="Author" value="${plugin.author}"/> 114 <attribute name="Plugin-Class" value="${plugin.class}"/> 45 115 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 46 <attribute name="Plugin-Description" value=" Provides a dialog for editing tags in a tabular grid."/>47 <attribute name="Plugin-Link" value=" http://wiki.openstreetmap.org/index.php/JOSM/Plugins/TagEditor"/>48 <attribute name="Plugin-Mainversion" value=" 1504"/>116 <attribute name="Plugin-Description" value="${plugin.description}"/> 117 <attribute name="Plugin-Link" value="${plugin.doc.url}"/> 118 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 49 119 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 50 120 </manifest> 51 121 </jar> 52 122 </target> 123 124 <!-- 125 ********************************************************** 126 ** revision - extracts the current revision number for the 127 ** file build.number and stores it in the XML property 128 ** version.* 129 ********************************************************** 130 --> 53 131 <target name="revision"> 54 132 … … 63 141 <delete file="REVISION"/> 64 142 </target> 143 144 <!-- 145 ********************************************************** 146 ** clean - clean up the build environment 147 ********************************************************** 148 --> 65 149 <target name="clean"> 66 150 <delete dir="${plugin.build.dir}"/> 67 151 <delete file="${plugin.jar}"/> 68 152 </target> 69 <target name="install" depends="dist"> 153 154 <!-- 155 ********************************************************** 156 ** install - install the plugin in your local JOSM installation 157 ********************************************************** 158 --> 159 <target name="install" depends="dist"> 70 160 <property environment="env"/> 71 161 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> … … 77 167 </target> 78 168 79 <target name="commit"> 169 <!-- 170 ********************************************************** 171 ** publish - publish the plugin jar 172 ********************************************************** 173 --> 174 <target name="publish"> 80 175 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 81 176 <env key="LANG" value="C"/> … … 83 178 <arg value="--message"/> 84 179 <arg value="manual build"/> 85 <arg value=" ../../dist/tageditor.jar"/>180 <arg value="${plugin.jar}"/> 86 181 </exec> 87 182 </target>
Note:
See TracChangeset
for help on using the changeset viewer.