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