Changeset 3454 in osm


Ignore:
Timestamp:
2007-07-02T20:02:35+02:00 (17 years ago)
Author:
christofd
Message:

changed completely

File:
1 edited

Legend:

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

    r3335 r3454  
    11<project name="pluginmanager" default="dist" basedir=".">
    22
     3        <!-- compilation properties -->
    34        <property name="josm.build.dir" value="../JOSM"/>
    45        <property name="josm.home.dir" value="${user.home}/.josm"/>
    56        <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       
     10        <!-- plugin meta data (enter new version number if anything changed!) -->
     11        <property name="plugin.version" value="0.3.0"/>
     12        <property name="plugin.description" value="Manage plugins and provide update mechanism (V${plugin.version})."/>
     13  <property name="plugin.class" value="at.dallermassl.josm.plugin.pluginmanager.PluginManagerPlugin"/>
    614
     15        <!-- update site meta data -->
     16        <property name="plugin.site.file" value="josm-site.xml"/>
     17        <property name="plugin.site.description" value="Josm's PluginManager Update Site"/>
     18  <property name="plugin.site.url" value="http://www.tegmento.org/~cdaller/josm/pluginmanager/"/>
     19  <property name="plugin.site.upload.target" value="cdaller@www.tegmento.org:public_html/josm/pluginmanager/"/>
     20       
    721
    8        
    9         <target name="dist" depends="compile">
     22        <target name="dist" depends="compile, site">
    1023                <!-- images -->
    1124                <!--
     
    2134                </copy>
    2235               
    23                 <!-- create josm-custom.jar -->
    24                 <jar destfile="${ant.project.name}.jar" basedir="${plugin.build.dir}">
     36                <!-- create jar file -->
     37                <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    2538                        <manifest>
    26         <attribute name="Plugin-Class" value="at.dallermassl.josm.plugin.pluginmanager.PluginManagerPlugin" />
    27         <attribute name="Plugin-Description" value="Manage plugins and provide update mechanism." />
    28         <attribute name="Plugin-Version" value="0.1" />
     39        <attribute name="Plugin-Class" value="${plugin.class}" />
     40        <attribute name="Plugin-Description" value="${plugin.description}" />
     41        <attribute name="Plugin-Version" value="${plugin.version}" />
    2942        <!--attribute name="Plugin-Dependencies" value="org.eigenheimstrasse.josm" /-->
    3043                        </manifest>
     
    4558
    4659        <target name="install" depends="dist">
    47                 <copy file="${ant.project.name}.jar" todir="${josm.home.dir}/plugins" />
     60                <copy file="${plugin.jar}" todir="${josm.home.dir}/plugins" />
    4861        </target>
    4962
     
    5467        <target name="clean">
    5568                <delete dir="${plugin.build.dir}" />
     69    <delete dir="${plugin.site.file}" />
     70    <delete dir="${plugin.jar}" />
     71        </target>
     72
     73        <!-- write site description for the given plugin -->
     74  <target name="site">
     75        <echo message="creating site description in ${plugin.site.file}"/>
     76        <echo file="${plugin.site.file}">&lt;?xml version="1.0"?>
     77&lt;site version="1.0">
     78  &lt;!-- meta data of site -->
     79  &lt;site-info>
     80    &lt;site-name>${plugin.site.description}&lt;/site-name>
     81    &lt;site-url>${plugin.site.url}&lt;/site-url>
     82  &lt;/site-info>
     83
     84  &lt;!-- plugins available on this site -->
     85  &lt;plugins>
     86    &lt;plugin id="${ant.project.name}" version="${plugin.version}">
     87      &lt;name>${ant.project.name}&lt;/name>
     88      &lt;description>${plugin.description}&lt;/description>
     89      &lt;resources>
     90        &lt;resource src="${plugin.site.url}/${plugin.jar}"
     91                  target="$${josm.user.dir}/plugins/${plugin.jar}"/>
     92      &lt;/resources>
     93    &lt;/plugin>
     94  &lt;/plugins>
     95&lt;/site>
     96        </echo>
     97  </target>
     98
     99        <!-- upload the site description and the jar file via ssh -->
     100        <target name="upload" depends="dist,site">
     101                <echo message="uploading jar and site description to ${plugin.site.upload.target}"/>
     102                <exec executable="scp">
     103                        <arg value="${plugin.jar}"/>
     104      <arg value="${plugin.site.file}"/>
     105                        <arg value="${plugin.site.upload.target}"/>
     106                </exec>
    56107        </target>
    57108
Note: See TracChangeset for help on using the changeset viewer.