Changeset 14003 in osm for applications/editors/josm/plugins/openvisible
- Timestamp:
- 2009-03-08T12:02:49+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/openvisible/build.xml
r12780 r14003 1 1 <project name="openvisible" default="dist" basedir="."> 2 <!-- josm "user home" directory depends on the platform used (windows has a different place than unix/linux) --> 3 <property environment="env"/> 4 <condition property="josm.home.dir" value="${env.APPDATA}/JOSM" else="${user.home}/.josm"> 5 <and> 6 <os family="windows"/> 7 </and> 8 </condition> 9 <!-- compilation properties --> 10 <property name="josm.build.dir" value="../../core"/> 11 <property name="josm.plugins.dir" value="${josm.home.dir}/plugins"/> 12 <property name="plugin.build.dir" value="build"/> 13 <property name="plugin.dist.dir" value="../../dist"/> 14 <property name="plugin.name" value="${ant.project.name}"/> 15 <property name="plugin.jar" value="${plugin.name}.jar"/> 16 <property name="plugin.description" value="Allows opening gpx/osm files that intersect the currently visible screen area (V${plugin.version})."/> 17 <property name="plugin.stage" value="50"/> 18 <property name="plugin.class" value="at.dallermassl.josm.plugin.openvisible.OpenVisiblePlugin"/> 19 <!-- update site meta data --> 20 <property name="plugin.site.file" value="josm-site.xml"/> 21 <property name="plugin.site.description" value="Josm's OpenVisible Update Site"/> 22 <property name="plugin.site.url" value="http://www.tegmento.org/~cdaller/josm/${ant.project.name}/"/> 23 <property name="plugin.site.upload.target" value="cdaller@www.tegmento.org:public_html/josm/${ant.project.name}/"/> 2 <property name="josm" location="../../core/dist/josm-custom.jar"/> 3 <property name="plugin.dist.dir" value="../../dist"/> 4 <property name="plugin.build.dir" value="build"/> 5 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 24 6 <property name="ant.build.javac.target" value="1.5"/> 25 <target name="dist" depends="compile,site"> 26 <!-- images --> 7 <target name="init"> 8 <mkdir dir="${plugin.build.dir}"/> 9 </target> 10 <target name="compile" depends="init"> 11 <echo message="creating ${plugin.jar}"/> 12 <javac srcdir="src" classpath="${josm}" debug="false" destdir="${plugin.build.dir}"> 13 <compilerarg value="-Xlint:deprecation"/> 14 <compilerarg value="-Xlint:unchecked"/> 15 </javac> 16 </target> 17 <target name="dist" depends="compile,revision"> 27 18 <copy todir="${plugin.build.dir}/images"> 28 <fileset dir="images" 19 <fileset dir="images"/> 29 20 </copy> 30 <!-- copy configuration xml files 31 <copy todir="${plugin.build.dir}"> 32 <fileset dir="src"> 33 <include name="*.xml"/> 34 </fileset> 35 </copy> 36 --> 37 <mkdir dir="${plugin.dist.dir}"/> 21 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 22 <manifest> 23 <attribute name="Author" value="Christof Dallermassl"/> 24 <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.openvisible.OpenVisiblePlugin"/> 25 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 26 <attribute name="Plugin-Dependencies" value="jgrapht-jdk1.5"/> 27 <attribute name="Plugin-Description" value="Allows opening gpx/osm files that intersect the currently visible screen area"/> 28 <attribute name="Plugin-Mainversion" value="1465"/> 29 <attribute name="Plugin-Stage" value="50"/> 30 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 31 </manifest> 32 </jar> 33 </target> 34 <target name="revision"> 38 35 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 39 36 <env key="LANG" value="C"/> … … 44 41 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 45 42 <delete file="REVISION"/> 46 <!-- create jar file -->47 <jar destfile="${plugin.dist.dir}/${plugin.jar}" basedir="${plugin.build.dir}">48 <manifest>49 <attribute name="Plugin-Class" value="${plugin.class}" />50 <attribute name="Plugin-Description" value="${plugin.description}" />51 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>52 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>53 <attribute name="Plugin-Mainversion" value="1180" />54 <attribute name="Plugin-Dependencies" value="jgrapht-jdk1.5" />55 <attribute name="Plugin-Stage" value="${plugin.stage}" />56 </manifest>57 </jar>58 43 </target> 59 <target name="compile" depends="init"> 60 <echo message="creating ${plugin.jar}"/> 61 <mkdir dir="${plugin.build.dir}"/> 62 <javac srcdir="src" destdir="${plugin.build.dir}" debug="true" source="1.5" target="1.5"> 63 <classpath> 64 <pathelement path="${josm.build.dir}/build"/> 65 <fileset dir="${josm.build.dir}/lib"> 66 <include name="**/*.jar"/> 67 </fileset> 68 <!-- 69 <fileset dir="lib"> 70 <include name="**/*.jar"/> 71 </fileset> 72 --> 73 </classpath> 74 </javac> 44 <target name="clean"> 45 <delete dir="${plugin.build.dir}"/> 46 <delete file="${plugin.jar}"/> 75 47 </target> 76 48 <target name="install" depends="dist"> 77 <copy file="${plugin.dist.dir}/${plugin.jar}" todir="${josm.plugins.dir}"/> 78 <!-- 79 <copy todir="${josm.home.dir}/plugins"> 80 <fileset dir="lib"> 81 <include name="**/*.jar"/> 82 </fileset> 83 </copy> 84 --> 85 </target> 86 <target name="init"> 87 <echo>java version: ${java.version}</echo> 88 </target> 89 <!-- write site description for the given plugin so josm will accept it --> 90 <target name="site"> 91 <echo message="creating site description in ${plugin.site.file}"/> 92 <echo file="${plugin.site.file}"><!-- plugins available on this site --> 93 <plugins> 94 <plugin id="${ant.project.name}" version="${plugin.version}"> 95 <name>${ant.project.name}</name> 96 <description>${plugin.description}</description> 97 <resource>${plugin.site.url}${plugin.jar}</resource> 98 </plugin> 99 </plugins> 100 </echo> 101 </target> 102 <!-- write site description for the given plugin (not implemented in JOSM as full version yet!) --> 103 <target name="site-full-donotuse"> 104 <echo message="creating site description in ${plugin.site.file}"/> 105 <echo file="${plugin.site.file}"><?xml version="1.0"?> 106 <site version="1.0"> 107 <!-- meta data of site --> 108 <site-info> 109 <site-name>${plugin.site.description}</site-name> 110 <site-url>${plugin.site.url}</site-url> 111 </site-info> 112 113 <!-- plugins available on this site --> 114 <plugins> 115 <plugin id="${ant.project.name}" version="${plugin.version}"> 116 <name>${ant.project.name}</name> 117 <description>${plugin.description}</description> 118 <resources> 119 <resource src="${plugin.site.url}${plugin.jar}" 120 target="${josm.home.dir}/plugins/${plugin.jar}"/> 121 </resources> 122 </plugin> 123 </plugins> 124 </site> 125 </echo> 126 </target> 127 <!-- upload the site description and the jar file via ssh --> 128 <target name="upload" depends="dist,site"> 129 <echo message="uploading jar and site description to ${plugin.site.upload.target}"/> 130 <exec executable="scp"> 131 <arg value="${plugin.dist.dir}/${plugin.jar}"/> 132 <arg value="${plugin.site.file}"/> 133 <arg value="${plugin.site.upload.target}"/> 134 </exec> 135 </target> 136 <target name="clean"> 137 <delete dir="${plugin.build.dir}" /> 138 <delete dir="${plugin.site.file}" /> 139 <delete file="${plugin.dist.dir}/${plugin.jar}" /> 49 <property environment="env"/> 50 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 51 <and> 52 <os family="windows"/> 53 </and> 54 </condition> 55 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 140 56 </target> 141 57 </project>
Note:
See TracChangeset
for help on using the changeset viewer.