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

Last change on this file since 12780 was 12780, checked in by stoecker, 16 years ago

removed tab stop usage

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