Changeset 14837 in osm for applications/editors/josm/plugins/piclayer
- Timestamp:
- 2009-04-30T14:58:19+02:00 (16 years ago)
- Location:
- applications/editors/josm/plugins/piclayer
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/piclayer/build.xml
r14774 r14837 5 5 ** Maintaining versions 6 6 ** ==================== 7 ** see README.template 7 ** see README.template 8 8 ** 9 9 ** Usage 10 10 ** ===== 11 11 ** To build it run 12 ** 12 ** 13 13 ** > ant dist 14 14 ** 15 ** To install the generated plugin locally (in you default plugin directory) run 16 ** 15 ** To install the generated plugin locally (in you default plugin directory) run 16 ** 17 17 ** > ant install 18 ** 18 ** 19 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 20 ** dialog. You have to check it in first. 23 21 ** 24 22 --> 25 23 <project name="PicLayer" default="dist" basedir="."> 26 24 <!-- 25 ************************************************ 26 ** should not be necessary to change the following properties 27 --> 28 <property name="josm" location="../../core/dist/josm-custom.jar"/> 29 <property name="plugin.build.dir" value="build"/> 30 <property name="plugin.src.dir" value="src"/> 31 <!-- this is the directory where the plugin jar is copied to --> 32 <property name="plugin.dist.dir" value="../../dist"/> 33 <property name="ant.build.javac.target" value="1.5"/> 34 <property name="plugin.dist.dir" value="../../dist"/> 35 <property name="plugin.jar" value="${plugin.dist.dir}/${plugin.jar.name}"/> 27 36 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="Tomasz Stelmach"/> 37 <property name="plugin.class" value="org.openstreetmap.josm.plugins.piclayer.PicLayerPlugin"/> 38 <property name="plugin.description" value="This plugin allows to display any picture as a background in the editor and align it with the map."/> 39 <property name="plugin.doc.url" value=""/> 40 <property name="plugin.main.version" value="2"/> 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 --> 52 <property name="plugin.dist.dir" value="../../dist"/> 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 --> 37 <!-- 38 ********************************************************** 39 ** init - initializes the build 40 ********************************************************** 41 --> 62 42 <target name="init"> 63 <!-- make sure we increment the build number ... -->64 <buildnumber file="build.number" />65 66 <!-- ... and check it back in -->67 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">68 <env key="LANG" value="C"/>69 <arg value="commit"/>70 <arg value="--message"/>71 <arg value="increment build number"/>72 <arg value="build.number"/>73 </exec>74 43 <mkdir dir="${plugin.build.dir}"/> 75 44 </target> 76 77 78 79 80 81 --> 45 46 <!-- 47 ********************************************************** 48 ** compile - complies the source tree 49 ********************************************************** 50 --> 82 51 <target name="compile" depends="init"> 83 52 <echo message="compiling sources for ${plugin.jar.name} ... "/> … … 88 57 </target> 89 58 90 91 92 93 94 --> 95 59 <!-- 60 ********************************************************** 61 ** dist - creates the plugin jar 62 ********************************************************** 63 --> 64 <target name="dist" depends="compile,revision"> 96 65 <echo message="creating ${plugin.jar.name} ... "/> 97 66 <copy todir="${plugin.build.dir}/resources"> 98 67 <fileset dir="resources"/> 99 68 </copy> 100 69 <copy todir="${plugin.build.dir}/images"> 101 70 <fileset dir="images"/> 102 71 </copy> 103 72 <copy todir="${plugin.build.dir}"> 104 73 <fileset dir="."> 105 106 74 <include name="README" /> 75 <include name="LICENSE" /> 107 76 </fileset> 108 77 </copy> 109 78 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 110 79 <manifest> 111 <attribute name="Author" value=" ${plugin.author}"/>112 <attribute name="Plugin-Class" value=" ${plugin.class}"/>80 <attribute name="Author" value="Tomasz Stelmach"/> 81 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.piclayer.PicLayerPlugin"/> 113 82 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 114 <attribute name="Plugin-Description" value="${plugin.description}"/> 115 <attribute name="Plugin-Link" value="${plugin.doc.url}"/> 116 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 117 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 83 <attribute name="Plugin-Description" value="This plugin allows to display any picture as a background in the editor and align it with the map."/> 84 <attribute name="Plugin-Mainversion" value="1529"/> 85 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 118 86 </manifest> 119 87 </jar> 120 88 </target> 121 122 123 124 125 126 127 128 --> 89 90 <!-- 91 ********************************************************** 92 ** revision - extracts the current revision number for the 93 ** file build.number and stores it in the XML property 94 ** version.* 95 ********************************************************** 96 --> 129 97 <target name="revision"> 130 131 98 99 <!-- extract the SVN revision information for file build.number --> 132 100 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 133 101 <env key="LANG" value="C"/> 134 102 <arg value="info"/> 135 103 <arg value="--xml"/> 136 <arg value=" build.number"/>104 <arg value="."/> 137 105 </exec> 138 106 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 139 107 <delete file="REVISION"/> 140 108 </target> 141 142 143 144 145 146 --> 109 110 <!-- 111 ********************************************************** 112 ** clean - clean up the build environment 113 ********************************************************** 114 --> 147 115 <target name="clean"> 148 116 <delete dir="${plugin.build.dir}"/> 149 117 <delete file="${plugin.jar}"/> 150 118 </target> 151 152 153 154 155 156 --> 157 119 120 <!-- 121 ********************************************************** 122 ** install - install the plugin in your local JOSM installation 123 ********************************************************** 124 --> 125 <target name="install" depends="dist"> 158 126 <property environment="env"/> 159 127 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> … … 164 132 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 165 133 </target> 166 167 <!--168 **********************************************************169 ** publish - publish the plugin jar170 **********************************************************171 -->172 <target name="publish">173 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">174 <env key="LANG" value="C"/>175 <arg value="commit"/>176 <arg value="--message"/>177 <arg value="manual build"/>178 <arg value="${plugin.jar}"/>179 </exec>180 </target>181 182 134 </project>
Note:
See TracChangeset
for help on using the changeset viewer.