source: osm/applications/editors/josm/plugins/navigator/build.xml@ 3686

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

Initial import.

File size: 4.9 KB
Line 
1<project name="navigator" default="dist" basedir=".">
2
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
10 <!-- plugin meta data (enter new version number if anything changed!) -->
11 <property name="plugin.version" value="0.1"/>
12 <property name="plugin.description" value="Provides routing functionality (V${plugin.version})."/>
13 <property name="plugin.stage" value="50"/>
14 <property name="plugin.class" value="at.dallermassl.josm.plugin.navigator.NavigatorPlugin"/>
15
16 <!-- update site meta data -->
17 <property name="plugin.site.file" value="josm-site.xml"/>
18 <property name="plugin.site.description" value="Josm's Surveyor Update Site"/>
19 <property name="plugin.site.url" value="http://www.tegmento.org/~cdaller/josm/${ant.project.name}/"/>
20 <property name="plugin.site.upload.target" value="cdaller@www.tegmento.org:public_html/josm/${ant.project.name}/"/>
21
22
23 <target name="dist" depends="compile,site">
24 <!-- images
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 -->
36
37 <!-- create jar file -->
38 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
39 <manifest>
40 <attribute name="Plugin-Class" value="${plugin.class}" />
41 <attribute name="Plugin-Description" value="${plugin.description}" />
42 <attribute name="Plugin-Version" value="${plugin.version}" />
43 <!--attribute name="Plugin-Dependencies" value="org.eigenheimstrasse.josm" /-->
44 <attribute name="Plugin-Stage" value="${plugin.stage}" />
45 <attribute name="Class-Path" value="navigator/lib/jgrapht-jdk1.5.jar" />
46 </manifest>
47 </jar>
48 </target>
49
50 <target name="compile" depends="init">
51 <mkdir dir="${plugin.build.dir}"/>
52 <javac srcdir="src" destdir="${plugin.build.dir}" debug="true" source="1.5" target="1.5">
53 <classpath>
54 <pathelement path="${josm.build.dir}/build"/>
55 <fileset dir="${josm.build.dir}/lib">
56 <include name="**/*.jar"/>
57 </fileset>
58 <fileset dir="lib">
59 <include name="**/*.jar"/>
60 </fileset>
61 </classpath>
62 </javac>
63 </target>
64
65 <target name="install" depends="dist">
66 <copy file="${plugin.jar}" todir="${josm.home.dir}/plugins" />
67 <mkdir dir="${josm.home.dir}/plugins/${ant.project.name}/lib"/>
68 <copy todir="${josm.home.dir}/plugins/${ant.project.name}/lib">
69 <fileset dir="lib">
70 <include name="**/*.jar"/>
71 </fileset>
72 </copy>
73 </target>
74
75 <target name="init">
76 <echo>java version: ${java.version}</echo>
77 </target>
78
79 <target name="clean">
80 <delete dir="${plugin.build.dir}" />
81 <delete dir="${plugin.site.file}" />
82 <delete dir="${plugin.jar}" />
83 </target>
84
85 <!-- write site description for the given plugin so josm will accept it -->
86 <target name="site">
87 <echo message="creating site description in ${plugin.site.file}"/>
88 <echo file="${plugin.site.file}">&lt;!-- plugins available on this site -->
89 &lt;plugins>
90 &lt;plugin id="${ant.project.name}" version="${plugin.version}">
91 &lt;name>${ant.project.name}&lt;/name>
92 &lt;description>${plugin.description}&lt;/description>
93 &lt;resource>${plugin.site.url}${plugin.jar}&lt;/resource>
94 &lt;/plugin>
95 &lt;/plugins>
96 </echo>
97 </target>
98
99 <!-- write site description for the given plugin (not implemented in JOSM as full version yet!) -->
100 <target name="site-full-donotuse">
101 <echo message="creating site description in ${plugin.site.file}"/>
102 <echo file="${plugin.site.file}">&lt;?xml version="1.0"?>
103&lt;site version="1.0">
104 &lt;!-- meta data of site -->
105 &lt;site-info>
106 &lt;site-name>${plugin.site.description}&lt;/site-name>
107 &lt;site-url>${plugin.site.url}&lt;/site-url>
108 &lt;/site-info>
109
110 &lt;!-- plugins available on this site -->
111 &lt;plugins>
112 &lt;plugin id="${ant.project.name}" version="${plugin.version}">
113 &lt;name>${ant.project.name}&lt;/name>
114 &lt;description>${plugin.description}&lt;/description>
115 &lt;resources>
116 &lt;resource src="${plugin.site.url}${plugin.jar}"
117 target="${josm.home.dir}/plugins/${plugin.jar}"/>
118 &lt;/resources>
119 &lt;/plugin>
120 &lt;/plugins>
121&lt;/site>
122 </echo>
123 </target>
124
125
126 <!-- upload the site description and the jar file via ssh -->
127 <target name="upload" depends="dist,site">
128 <echo message="uploading jar and site description to ${plugin.site.upload.target}"/>
129 <exec executable="scp">
130 <arg value="${plugin.jar}"/>
131 <arg value="${plugin.site.file}"/>
132 <arg value="${plugin.site.upload.target}"/>
133 </exec>
134 </target>
135
136</project>
Note: See TracBrowser for help on using the repository browser.