Changeset 3411 in osm for applications/editors/josm


Ignore:
Timestamp:
2007-06-29T18:41:21+02:00 (18 years ago)
Author:
christofd
Message:

added site generation for pluginmanagement
most values are put into property values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/surveyor/build.xml

    r3351 r3411  
    11<project name="surveyor" default="dist" basedir=".">
    22
    3         <property name="josm.build.dir" value="../JOSM"/>
    4         <property name="josm.home.dir" value="${user.home}/.josm"/>
    5   <property name="livegpsplugin.jar" value="${josm.home.dir}/plugins/livegps.jar"/>
    6         <property name="plugin.build.dir" value="bin"/>
     3         <!-- compilation properties -->
     4          <property name="josm.build.dir" value="../JOSM"/>
     5          <property name="josm.home.dir" value="${user.home}/.josm"/>
     6          <property name="plugin.build.dir" value="bin"/>
     7          <property name="plugin.name" value="${ant.project.name}"/>
     8          <property name="plugin.jar" value="${plugin.name}.jar"/>
     9    <property name="livegpsplugin.jar" value="${josm.home.dir}/plugins/livegps.jar"/>
     10         
     11          <!-- plugin meta data (enter new version number if anything changed!) -->
     12          <property name="plugin.version" value="1.1"/>
     13          <property name="plugin.description" value="Allow adding markers/nodes on current gps positions (V${plugin.version})."/>
     14          <property name="plugin.stage" value="60"/>
     15    <property name="plugin.class" value="at.dallermassl.josm.plugin.surveyor.SurveyorPlugin"/>
     16         
     17          <!-- update site meta data -->
     18          <property name="plugin.site.file" value="josm-site.xml"/>
     19          <property name="plugin.site.description" value="Josm's Surveyor Update Site"/>
     20          <property name="plugin.site.url" value="http://www.tegmento.org/~cdaller/josm/surveyor/"/>
     21          <property name="plugin.site.upload.target" value="cdaller@www.tegmento.org:public_html/josm/surveyor/"/>
     22         
    723
    8 
    9        
    10         <target name="dist" depends="compile">
     24        <target name="dist" depends="compile,site">
    1125                <!-- images -->
    1226                <copy todir="${plugin.build.dir}/images">
     
    2034                </copy>
    2135               
    22                 <!-- create josm-custom.jar -->
    23                 <jar destfile="${ant.project.name}.jar" basedir="${plugin.build.dir}">
    24                         <manifest>
    25         <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.surveyor.SurveyorPlugin" />
    26         <attribute name="Plugin-Description" value="Allow adding markers/nodes on current gps positions." />
    27         <!--attribute name="Plugin-Dependencies" value="livegps(1.0)" /-->
    28         <attribute name="Plugin-Version" value="1.1" />
    29         <attribute name="Plugin-Stage" value="60" />
    30                         </manifest>
    31                 </jar>
     36    <!-- create jar file -->
     37    <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
     38      <manifest>
     39        <attribute name="Plugin-Class" value="${plugin.class}" />
     40        <attribute name="Plugin-Description" value="${plugin.description}" />
     41        <attribute name="Plugin-Version" value="${plugin.version}" />
     42        <!--attribute name="Plugin-Dependencies" value="org.eigenheimstrasse.josm" /-->
     43        <attribute name="Plugin-Stage" value="${plugin.stage}" />
     44      </manifest>
     45    </jar>
    3246        </target>
    3347
     
    4559        </target>
    4660
    47         <target name="install" depends="dist">
    48                 <copy file="${ant.project.name}.jar" todir="${josm.home.dir}/plugins" />
    49         </target>
     61  <target name="install" depends="dist">
     62    <copy file="${plugin.jar}" todir="${josm.home.dir}/plugins" />
     63  </target>
    5064
    5165  <target name="init">
    52          </target>
     66     <echo>java version: ${java.version}</echo>
     67   </target>
    5368
    54         <target name="clean">
    55                 <delete dir="${plugin.build.dir}" />
    56         </target>
     69  <target name="clean">
     70    <delete dir="${plugin.build.dir}" />
     71    <delete dir="${plugin.site.file}" />
     72    <delete dir="${plugin.jar}" />
     73  </target>
     74
     75  <!-- write site description for the given plugin -->
     76  <target name="site">
     77    <echo message="creating site description in ${plugin.site.file}"/>
     78    <echo file="${plugin.site.file}">&lt;?xml version="1.0"?>
     79&lt;site version="1.0">
     80  &lt;!-- meta data of site -->
     81  &lt;site-info>
     82    &lt;site-name>${plugin.site.description}&lt;/site-name>
     83    &lt;site-url>${plugin.site.url}&lt;/site-url>
     84  &lt;/site-info>
     85
     86  &lt;!-- plugins available on this site -->
     87  &lt;plugins>
     88    &lt;plugin id="${ant.project.name}" version="${plugin.version}">
     89      &lt;name>${ant.project.name}&lt;/name>
     90      &lt;description>${plugin.description}&lt;/description>
     91      &lt;resources>
     92        &lt;resource src="${plugin.site.url}/${plugin.jar}"
     93                  target="$${josm.user.dir}/plugins/${plugin.jar}"/>
     94      &lt;/resources>
     95    &lt;/plugin>
     96  &lt;/plugins>
     97&lt;/site>
     98    </echo>
     99  </target>
     100
     101  <!-- upload the site description and the jar file via ssh -->
     102  <target name="upload" depends="dist,site">
     103    <echo message="uploading jar and site description to ${plugin.site.upload.target}"/>
     104    <exec executable="scp">
     105      <arg value="${plugin.jar}"/>
     106      <arg value="${plugin.site.file}"/>
     107      <arg value="${plugin.site.upload.target}"/>
     108    </exec>
     109  </target>
    57110
    58111</project>
Note: See TracChangeset for help on using the changeset viewer.