source: subversion/applications/editors/josm/plugins/colorscheme/build.xml @ 3785

Last change on this file since 3785 was 3785, checked in by ulf, 12 years ago

add colorscheme, lang and grid, lang and grid doesn't compile :-(

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