Changeset 28995 in osm for applications/editors/josm/plugins/geotools
- Timestamp:
- 2012-11-27T17:49:42+01:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/geotools
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/geotools/README
r28592 r28995 2 2 ====== 3 3 This plugin provides parts of the GeoTools library for JOSM plugins. 4 * Licensed under GPL v3 4 * Licensed under GPL v3 (see LICENSE) -
applications/editors/josm/plugins/geotools/build.xml
r28946 r28995 33 33 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 34 34 <property name="plugin.main.version" value="5236"/> 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"/> 39 <!-- this is the directory where the plugin jar is copied to --> 40 <property name="plugin.dist.dir" value="../../dist"/> 41 <property name="ant.build.javac.target" value="1.6"/> 42 <property name="ant.build.javac.source" value="1.6"/> 43 <property name="plugin.dist.dir" value="../../dist"/> 44 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 45 <!-- 46 ********************************************************** 47 ** init - initializes the build 48 ********************************************************** 35 36 <!-- Configure these properties (replace "..." accordingly). 37 See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins 49 38 --> 50 <target name="init"> 51 <mkdir dir="${plugin.build.dir}"/> 52 </target> 53 <!-- 54 ********************************************************** 55 ** compile - complies the source tree 56 ********************************************************** 57 --> 58 <target name="compile" depends="init"> 59 <echo message="compiling sources for ${plugin.jar} ... "/> 60 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}"> 61 <classpath> 62 <pathelement location="${josm}"/> 63 <fileset dir="lib"> 64 <include name="**/*.jar"/> 65 </fileset> 66 </classpath> 67 <compilerarg value="-Xlint:deprecation"/> 68 <compilerarg value="-Xlint:unchecked"/> 69 </javac> 70 </target> 39 <property name="plugin.author" value="Don-vip"/> 40 <property name="plugin.class" value="org.openstreetmap.josm.plugins.geotools.GeoToolsPlugin"/> 41 <property name="plugin.description" value="Provides parts of the GeoTools library for other JOSM plugins. Not meant to be installed directly by users, but rather as a dependency for other plugins."/> 42 <property name="plugin.icon" value="images/compass.png"/> 43 <!--<property name="plugin.link" value="..."/>--> 44 <property name="plugin.early" value="true"/> 45 <property name="plugin.requires" value="jts"/> 46 <property name="plugin.stage" value="20"/> 47 48 <!-- ** include targets that all plugins have in common ** --> 49 <import file="../build-common.xml"/> 50 71 51 <!-- 72 52 ********************************************************** … … 92 72 <fileset dir="images"/> 93 73 </copy> 74 <copy todir="${plugin.build.dir}/data" includeemptydirs="no"> 75 <fileset dir="data"/> 76 </copy> 94 77 <copy todir="${plugin.build.dir}"> 95 78 <fileset dir="."> 96 79 <include name="README"/> 97 <include name=" GPL-v3.0.txt"/>80 <include name="LICENSE"/> 98 81 </fileset> 99 82 </copy> 100 83 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 101 <!--102 ************************************************103 ** configure these properties. Most of them will be copied to the plugins104 ** manifest file. Property values will also show up in the list available105 ** plugins: http://josm.openstreetmap.de/wiki/Plugins.106 **107 ************************************************108 -->109 84 <manifest> 110 <attribute name="Author" value=" Don-vip"/>111 <attribute name="Plugin-Class" value=" org.openstreetmap.josm.plugins.geotools.GeoToolsPlugin"/>85 <attribute name="Author" value="${plugin.author}"/> 86 <attribute name="Plugin-Class" value="${plugin.class}"/> 112 87 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 113 <attribute name="Plugin-Description" value=" Provides parts of the GeoTools library for other JOSM plugins. Not meant to be installed directly by users, but rather as a dependency for other plugins."/>114 <attribute name="Plugin-Icon" value=" images/compass.png"/>115 <!--<attribute name="Plugin-Link" value=" http://fixme.com"/>-->88 <attribute name="Plugin-Description" value="${plugin.description}"/> 89 <attribute name="Plugin-Icon" value="${plugin.icon}"/> 90 <!--<attribute name="Plugin-Link" value="${plugin.link}"/>--> 116 91 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 117 <attribute name="Plugin-Requires" value=" jts"/>118 <attribute name="Plugin-Stage" value=" 20"/>92 <attribute name="Plugin-Requires" value="${plugin.requires}"/> 93 <attribute name="Plugin-Stage" value="${plugin.stage}"/> 119 94 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 120 95 </manifest> 121 96 </jar> 122 97 </target> 123 <!--124 **********************************************************125 ** revision - extracts the current revision number for the126 ** file build.number and stores it in the XML property127 ** version.*128 **********************************************************129 -->130 <target name="revision">131 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">132 <env key="LANG" value="C"/>133 <arg value="info"/>134 <arg value="--xml"/>135 <arg value="."/>136 </exec>137 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>138 <delete file="REVISION"/>139 </target>140 <!--141 **********************************************************142 ** clean - clean up the build environment143 **********************************************************144 -->145 <target name="clean">146 <delete dir="${plugin.build.dir}"/>147 <delete file="${plugin.jar}"/>148 </target>149 <!--150 **********************************************************151 ** install - install the plugin in your local JOSM installation152 **********************************************************153 -->154 <target name="install" depends="dist">155 <property environment="env"/>156 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">157 <and>158 <os family="windows"/>159 </and>160 </condition>161 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>162 </target>163 <!--164 ************************** Publishing the plugin ***********************************165 -->166 <!--167 ** extracts the JOSM release for the JOSM version in ../core and saves it in the168 ** property ${coreversion.info.entry.revision}169 -->170 <target name="core-info">171 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">172 <env key="LANG" value="C"/>173 <arg value="info"/>174 <arg value="--xml"/>175 <arg value="../../core"/>176 </exec>177 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>178 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>179 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>180 <delete file="core.info.xml"/>181 </target>182 <!-- commits the source tree for this plugin -->183 <target name="commit-current">184 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>185 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">186 <env key="LANG" value="C"/>187 <arg value="commit"/>188 <arg value="-m '${commit.message}'"/>189 <arg value="."/>190 </exec>191 </target>192 <!-- updates (svn up) the source tree for this plugin -->193 <target name="update-current">194 <echo>Updating plugin source ...</echo>195 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">196 <env key="LANG" value="C"/>197 <arg value="up"/>198 <arg value="."/>199 </exec>200 <echo>Updating ${plugin.jar} ...</echo>201 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">202 <env key="LANG" value="C"/>203 <arg value="up"/>204 <arg value="../dist/${plugin.jar}"/>205 </exec>206 </target>207 <!-- commits the plugin.jar -->208 <target name="commit-dist">209 <echo>210 ***** Properties of published ${plugin.jar} *****211 Commit message : '${commit.message}'212 Plugin-Mainversion: ${plugin.main.version}213 JOSM build version: ${coreversion.info.entry.revision}214 Plugin-Version : ${version.entry.commit.revision}215 ***** / Properties of published ${plugin.jar} *****216 217 Now commiting ${plugin.jar} ...218 </echo>219 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">220 <env key="LANG" value="C"/>221 <arg value="-m '${commit.message}'"/>222 <arg value="commit"/>223 <arg value="${plugin.jar}"/>224 </exec>225 </target>226 <!-- make sure svn is present as a command line tool -->227 <target name="ensure-svn-present">228 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">229 <env key="LANG" value="C"/>230 <arg value="--version"/>231 </exec>232 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">233 <!-- return code not set at all? Most likely svn isn't installed -->234 <condition>235 <not>236 <isset property="svn.exit.code"/>237 </not>238 </condition>239 </fail>240 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">241 <!-- error code from SVN? Most likely svn is not what we are looking on this system -->242 <condition>243 <isfailure code="${svn.exit.code}"/>244 </condition>245 </fail>246 </target>247 <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">248 </target>249 98 </project>
Note:
See TracChangeset
for help on using the changeset viewer.