source: osm/applications/editors/josm/plugins/pluginmanager/build.xml@ 3769

Last change on this file since 3769 was 3454, checked in by christofd, 17 years ago

changed completely

File size: 3.8 KB
RevLine 
[3335]1<project name="pluginmanager" default="dist" basedir=".">
2
[3454]3 <!-- compilation properties -->
[3335]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"/>
[3454]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"/>
[3335]14
[3454]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
[3335]21
[3454]22 <target name="dist" depends="compile, site">
[3335]23 <!-- images -->
24 <!--
25 <copy todir="${plugin.build.dir}/images">
26 <fileset dir="src/images" />
27 </copy>
28 -->
29 <!-- copy configuration xml files -->
30 <copy todir="${plugin.build.dir}">
31 <fileset dir="src">
32 <include name="*.xml"/>
33 </fileset>
34 </copy>
35
[3454]36 <!-- create jar file -->
37 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
[3335]38 <manifest>
[3454]39 <attribute name="Plugin-Class" value="${plugin.class}" />
40 <attribute name="Plugin-Description" value="${plugin.description}" />
41 <attribute name="Plugin-Version" value="${plugin.version}" />
[3335]42 <!--attribute name="Plugin-Dependencies" value="org.eigenheimstrasse.josm" /-->
43 </manifest>
44 </jar>
45 </target>
46
47 <target name="compile" depends="init">
48 <mkdir dir="${plugin.build.dir}"/>
49 <javac srcdir="src" destdir="${plugin.build.dir}" debug="true" source="1.5" target="1.5">
50 <classpath>
51 <pathelement path="${josm.build.dir}/build"/>
52 <fileset dir="${josm.build.dir}/lib">
53 <include name="**/*.jar"/>
54 </fileset>
55 </classpath>
56 </javac>
57 </target>
58
59 <target name="install" depends="dist">
[3454]60 <copy file="${plugin.jar}" todir="${josm.home.dir}/plugins" />
[3335]61 </target>
62
63 <target name="init">
64 <echo>java version: ${java.version}</echo>
65 </target>
66
67 <target name="clean">
68 <delete dir="${plugin.build.dir}" />
[3454]69 <delete dir="${plugin.site.file}" />
70 <delete dir="${plugin.jar}" />
[3335]71 </target>
72
[3454]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>
107 </target>
108
[3335]109</project>
Note: See TracBrowser for help on using the repository browser.