Changeset 26174 in osm for applications/editors/josm/plugins/smed_fw
- Timestamp:
- 2011-06-25T19:02:31+02:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed_fw
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed_fw/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="smed_fw" basedir="."> 31 32 <!-- enter the SVN commit message --> 33 <property name="commit.message" value="smed with embeddes felix and DS" /> 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 <property name="plugin.main.version" value="3835" /> 36 37 38 <!-- 31 <!-- enter the SVN commit message --> 32 <property name="commit.message" value="smed with embeddes felix and DS"/> 33 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 34 <property name="plugin.main.version" value="3835"/> 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="felix" location="core/dist/felix.jar"/> 44 <property name="plugin.build.dir" value="build/" /> 45 <property name="plugin.src.dir" value="src/" /> 46 <property name="smed_fw.dist.dir" value="dist/" /> 47 <!-- this is the directory where the plugin jar is copied to --> 48 <property name="plugin.dist.dir" value="../../dist/" /> 49 <property name="smed_fw_core.dist.dir" value="core/dist/" /> 50 <property name="ant.build.javac.target" value="1.5" /> 51 <property name="plugin.jar" value="${plugin.dist.dir}${ant.project.name}.jar" /> 52 53 <!-- 39 <property name="josm" location="../../core/dist/josm-custom.jar"/> 40 <property name="felix" location="core/dist/felix.jar"/> 41 <property name="plugin.build.dir" value="build/"/> 42 <property name="plugin.src.dir" value="src/"/> 43 <property name="smed_fw.dist.dir" value="dist/"/> 44 <!-- this is the directory where the plugin jar is copied to --> 45 <property name="plugin.dist.dir" value="../../dist/"/> 46 <property name="smed_fw_core.dist.dir" value="core/dist/"/> 47 <property name="ant.build.javac.target" value="1.5"/> 48 <property name="plugin.jar" value="${plugin.dist.dir}${ant.project.name}.jar"/> 49 <!-- 54 50 ********************************************************** 55 51 ** init - initializes the build 56 52 ********************************************************** 57 53 --> 58 <target name="init"> 59 <mkdir dir="${plugin.build.dir}" /> 60 <mkdir dir="${smed_fw_core.dist.dir}" /> 61 <mkdir dir="${smed_fw.dist.dir}" /> 62 </target> 63 64 <!-- 54 <target name="init"> 55 <mkdir dir="${plugin.build.dir}"/> 56 <mkdir dir="${smed_fw_core.dist.dir}"/> 57 <mkdir dir="${smed_fw.dist.dir}"/> 58 </target> 59 <!-- 65 60 ********************************************************** 66 61 ** compile - complies the source tree 67 62 ********************************************************** 68 63 --> 69 <target name="compile" depends="init"> 70 <echo message="compiling sources for ${plugin.jar} ... " /> 71 <javac srcdir="src" classpath="${josm}:${felix}" debug="true" destdir="${plugin.build.dir}"> 72 <compilerarg value="-Xlint:deprecation" /> 73 <compilerarg value="-Xlint:unchecked" /> 74 </javac> 75 </target> 76 77 <!-- 64 <target name="compile" depends="init"> 65 <echo message="compiling sources for ${plugin.jar} ... "/> 66 <javac srcdir="src" classpath="${josm}:${felix}" debug="true" destdir="${plugin.build.dir}"> 67 <compilerarg value="-Xlint:deprecation"/> 68 <compilerarg value="-Xlint:unchecked"/> 69 </javac> 70 </target> 71 <!-- 78 72 ********************************************************** 79 73 ** dist - creates the plugin jar 80 74 ********************************************************** 81 75 --> 82 <target name="dist" depends="compile, revision"> 83 <echo message="creating ${ant.project.name}.jar ... " /> 84 85 <copy todir="${plugin.build.dir}/images"> 86 <fileset dir="${plugin.src.dir}/images" /> 87 </copy> 88 89 <copy todir="${plugin.build.dir}/images"> 90 <fileset dir="images" /> 91 </copy> 92 93 <copy todir="${plugin.build.dir}/smed_fw/msg"> 94 <fileset dir="${plugin.src.dir}/smed_fw/msg" /> 95 </copy> 96 97 <copy todir="${plugin.build.dir}"> 98 <fileset dir="${smed_fw.dist.dir}" /> 99 </copy> 100 101 <copy todir="${plugin.build.dir}"> 102 <fileset dir="."> 103 <include name="*.txt" /> 104 </fileset> 105 </copy> 106 107 <copy file="${felix}" todir="${plugin.build.dir}" /> 108 109 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 110 <!-- 76 <target name="dist" depends="compile, revision"> 77 <echo message="creating ${ant.project.name}.jar ... "/> 78 <copy todir="${plugin.build.dir}/images"> 79 <fileset dir="images"/> 80 </copy> 81 <copy todir="${plugin.build.dir}/smed_fw/msg"> 82 <fileset dir="${plugin.src.dir}/smed_fw/msg"/> 83 </copy> 84 <copy todir="${plugin.build.dir}"> 85 <fileset dir="${smed_fw.dist.dir}"/> 86 </copy> 87 <copy todir="${plugin.build.dir}"> 88 <fileset dir="."> 89 <include name="*.txt"/> 90 </fileset> 91 </copy> 92 <copy file="${felix}" todir="${plugin.build.dir}"/> 93 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 94 <!-- 111 95 ************************************************ 112 96 ** configure these properties. Most of them will be copied to the plugins … … 116 100 ************************************************ 117 101 --> 118 <manifest> 119 <attribute name="Author" value="Werner, Malcolm" /> 120 <attribute name="Plugin-Class" value="smed_fw.SmedFW" /> 121 <attribute name="Plugin-Date" value="${version.entry.commit.date}" /> 122 <attribute name="Plugin-Description" value="Create and edit seamaps for OpenSeaMap" /> 123 <attribute name="Plugin-Icon" value="images/Smed.png" /> 124 <attribute name="Plugin-Link" value="http://openseamap.org/" /> 125 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" /> 126 <!-- 127 <attribute name="Plugin-Version" value="23456"/> 128 --> 129 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" /> 130 <attribute name="Class-Path" value="bin/felix.jar"/> 131 132 </manifest> 133 </jar> 134 135 <!-- install interface --> 136 <copy file="${plugin.jar}" todir="${smed_fw_core.dist.dir}" /> 137 </target> 138 139 <!-- 102 <manifest> 103 <attribute name="Author" value="Werner, Malcolm"/> 104 <attribute name="Plugin-Class" value="smed_fw.SmedFW"/> 105 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 106 <attribute name="Plugin-Description" value="Create and edit seamaps for OpenSeaMap"/> 107 <attribute name="Plugin-Icon" value="images/Smed.png"/> 108 <attribute name="Plugin-Link" value="http://openseamap.org/"/> 109 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 110 <!-- 111 <attribute name="Plugin-Version" value="23456"/> 112 --> 113 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 114 <attribute name="Class-Path" value="bin/felix.jar"/> 115 </manifest> 116 </jar> 117 <!-- install interface --> 118 <copy file="${plugin.jar}" todir="${smed_fw_core.dist.dir}"/> 119 </target> 120 <!-- 140 121 ********************************************************** 141 122 ** revision - extracts the current revision number for the … … 144 125 ********************************************************** 145 126 --> 146 <target name="revision"> 147 148 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 149 <env key="LANG" value="C" /> 150 <arg value="info" /> 151 <arg value="--xml" /> 152 <arg value="." /> 153 </exec> 154 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" /> 155 <delete file="REVISION" /> 156 </target> 157 158 159 <!-- 127 <target name="revision"> 128 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 129 <env key="LANG" value="C"/> 130 <arg value="info"/> 131 <arg value="--xml"/> 132 <arg value="."/> 133 </exec> 134 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 135 <delete file="REVISION"/> 136 </target> 137 <!-- 160 138 ********************************************************** 161 139 ** clean - clean up the build environment 162 140 ********************************************************** 163 141 --> 164 <target name="clean"> 165 <delete dir="${plugin.build.dir}" /> 166 <delete file="${plugin.jar}" /> 167 </target> 168 169 <!-- 142 <target name="clean"> 143 <delete dir="${plugin.build.dir}"/> 144 <delete file="${plugin.jar}"/> 145 </target> 146 <!-- 170 147 ********************************************************** 171 148 ** install - install the plugin in your local JOSM installation 172 149 ********************************************************** 173 150 --> 174 <target name="install" depends="dist"> 175 <property environment="env" /> 176 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 177 <and> 178 <os family="windows" /> 179 </and> 180 </condition> 181 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" /> 182 </target> 183 184 <!-- 185 ** commits the source tree for this plugin 186 --> 187 <target name="commit-current"> 188 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 189 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 190 <env key="LANG" value="C" /> 191 <arg value="commit" /> 192 <arg value="-m '${commit.message}'" /> 193 <arg value="." /> 194 </exec> 195 </target> 196 197 <!-- 198 ** updates (svn up) the source tree for this plugin 199 --> 200 <target name="update-current"> 201 <echo>Updating plugin source ...</echo> 202 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 203 <env key="LANG" value="C" /> 204 <arg value="up" /> 205 <arg value="." /> 206 </exec> 207 <echo>Updating ${plugin.jar} ...</echo> 208 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 209 <env key="LANG" value="C" /> 210 <arg value="up" /> 211 <arg value="../dist/${plugin.jar}" /> 212 </exec> 213 </target> 214 151 <target name="install" depends="dist"> 152 <property environment="env"/> 153 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 154 <and> 155 <os family="windows"/> 156 </and> 157 </condition> 158 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 159 </target> 160 <!-- 161 ** commits the source tree for this plugin 162 --> 163 <target name="commit-current"> 164 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 165 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 166 <env key="LANG" value="C"/> 167 <arg value="commit"/> 168 <arg value="-m '${commit.message}'"/> 169 <arg value="."/> 170 </exec> 171 </target> 172 <!-- 173 ** updates (svn up) the source tree for this plugin 174 --> 175 <target name="update-current"> 176 <echo>Updating plugin source ...</echo> 177 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 178 <env key="LANG" value="C"/> 179 <arg value="up"/> 180 <arg value="."/> 181 </exec> 182 <echo>Updating ${plugin.jar} ...</echo> 183 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 184 <env key="LANG" value="C"/> 185 <arg value="up"/> 186 <arg value="../dist/${plugin.jar}"/> 187 </exec> 188 </target> 215 189 </project>
Note:
See TracChangeset
for help on using the changeset viewer.