Ticket #8222: plugin_build.patch
File plugin_build.patch, 6.0 KB (added by , 13 years ago) |
---|
-
build-common.xml
37 37 --> 38 38 <target name="compile" depends="init"> 39 39 <echo message="compiling sources for ${plugin.jar} ..."/> 40 <javac srcdir="src" classpath="${josm}"debug="true" destdir="${plugin.build.dir}" includeantruntime="false">40 <javac srcdir="src" debug="true" destdir="${plugin.build.dir}" includeantruntime="false"> 41 41 <compilerarg value="-Xlint:deprecation"/> 42 42 <compilerarg value="-Xlint:unchecked"/> 43 <classpath> 44 <pathelement location="${josm}"/> 45 <fileset dir="${plugin.lib.dir}"> 46 <include name="**/*.jar"/> 47 </fileset> 48 </classpath> 43 49 </javac> 44 50 </target> 45 51 <!-- 46 52 ********************************************************** 53 ** dist - creates the plugin jar 54 ********************************************************** 55 --> 56 <target name="dist" depends="compile,revision"> 57 <echo message="creating ${ant.project.name}.jar ... "/> 58 <copy todir="${plugin.build.dir}/resources"> 59 <fileset dir="resources"/> 60 </copy> 61 <copy todir="${plugin.build.dir}/images"> 62 <fileset dir="images"/> 63 </copy> 64 <copy todir="${plugin.build.dir}/data"> 65 <fileset dir="data"/> 66 </copy> 67 <copy todir="${plugin.build.dir}"> 68 <fileset dir="."> 69 <include name="README"/> 70 <include name="LICENSE"/> 71 </fileset> 72 </copy> 73 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 74 <!-- 75 ************************************************ 76 ** configure these properties. Most of them will be copied to the plugins 77 ** manifest file. Property values will also show up in the list available 78 ** plugins: http://josm.openstreetmap.de/wiki/Plugins. 79 ** 80 ************************************************ 81 --> 82 <manifest> 83 <attribute name="Author" value="${plugin.author}" /> 84 <attribute name="Plugin-Class" value="${plugin.class}" /> 85 <attribute name="Plugin-Date" value="${version.entry.commit.date}" /> 86 <attribute name="Plugin-Description" value="${plugin.description}" /> 87 <attribute name="Plugin-Icon" value="${plugin.icon}" /> 88 <attribute name="Plugin-Link" value="${plugin.link}" /> 89 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 90 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 91 </manifest> 92 <zipgroupfileset dir="${plugin.lib.dir}" includes="*.jar"/> 93 </jar> 94 </target> 95 <!-- 96 ********************************************************** 47 97 ** revision - extracts the current revision number for the 48 98 ** file build.number and stores it in the XML property 49 99 ** version.* -
00_plugin_dir_template/build.xml
34 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 35 <property name="plugin.main.version" value="4394"/> 36 36 37 <!-- 38 ********************************************************** 39 ** include targets that all plugins have in common 40 ********************************************************** 41 --> 37 <!-- TODO fill out --> 38 <property name="plugin.author" value="..."/> 39 <property name="plugin.class" value="..."/> 40 <property name="plugin.description" value="..."/> 41 <property name="plugin.icon" value="..."/> 42 <property name="plugin.link" value="..."/> 43 44 <!-- ** include targets that all plugins have in common ** --> 42 45 <import file="../build-common.xml"/> 43 46 44 <!--45 **********************************************************46 ** dist - creates the plugin jar47 **********************************************************48 -->49 <target name="dist" depends="compile,revision">50 <echo message="creating ${ant.project.name}.jar ... "/>51 <copy todir="${plugin.build.dir}/resources">52 <fileset dir="resources"/>53 </copy>54 <copy todir="${plugin.build.dir}/images">55 <fileset dir="images"/>56 </copy>57 <copy todir="${plugin.build.dir}/data">58 <fileset dir="data"/>59 </copy>60 <copy todir="${plugin.build.dir}">61 <fileset dir=".">62 <include name="README"/>63 <include name="LICENSE"/>64 </fileset>65 </copy>66 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">67 <!--68 ************************************************69 ** configure these properties. Most of them will be copied to the plugins70 ** manifest file. Property values will also show up in the list available71 ** plugins: http://josm.openstreetmap.de/wiki/Plugins.72 **73 ************************************************74 -->75 <manifest>76 <attribute name="Author" value="..."/>77 <attribute name="Plugin-Class" value="..."/>78 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>79 <attribute name="Plugin-Description" value="..."/>80 <attribute name="Plugin-Icon" value="..."/>81 <attribute name="Plugin-Link" value="..."/>82 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>83 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>84 </manifest>85 </jar>86 </target>87 47 </project>