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

Last change on this file since 7513 was 7287, checked in by joerg, 17 years ago

josm/plugins/*/build.xml: add echo to identify which compile failes

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