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

Last change on this file since 12780 was 12780, checked in by Dirk Stoecker, 11 years ago

removed tab stop usage

File size: 5.4 KB
Line 
1<project name="colorscheme" 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    <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})."/>
11    <property name="plugin.class" value="at.dallermassl.josm.plugin.colorscheme.ColorSchemePlugin"/>
12<!-- update site meta data -->
13    <property name="plugin.site.file" value="josm-site.xml"/>
14    <property name="plugin.site.description" value="Josm's ColorScheme Plugin Update Site"/>
15    <property name="plugin.site.url" value="http://www.tegmento.org/~cdaller/josm/colorscheme/"/>
16    <property name="plugin.site.upload.target" value="cdaller@www.tegmento.org:public_html/josm/colorscheme/"/>
17    <property name="ant.build.javac.target" value="1.5"/>
18    <target name="dist" depends="compile, site">
19        <echo message="creating ${plugin.jar}"/>
20<!-- images -->
21<!--
22     <copy todir="${plugin.build.dir}/images">
23       <fileset dir="src/images" />
24     </copy>
25     -->
26<!-- copy configuration xml files -->
27        <copy todir="${plugin.build.dir}">
28            <fileset dir="src">
29                <include name="*.xml"/>
30            </fileset>
31        </copy>
32        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
33            <env key="LANG" value="C"/>
34            <arg value="info"/>
35            <arg value="--xml"/>
36            <arg value="."/>
37        </exec>
38        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
39        <delete file="REVISION"/>
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="${version.entry.commit.revision}"/>
46                <attribute name="Plugin-Mainversion" value="1180"/>
47                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
48            </manifest>
49        </jar>
50    </target>
51    <target name="compile" depends="init">
52        <mkdir dir="${plugin.build.dir}"/>
53        <javac srcdir="src" destdir="${plugin.build.dir}" debug="true" source="1.5" target="1.5">
54            <classpath>
55                <pathelement path="${josm.build.dir}/build"/>
56                <fileset dir="${josm.build.dir}/lib">
57                    <include name="**/*.jar"/>
58                </fileset>
59            </classpath>
60        </javac>
61    </target>
62    <target name="install" depends="dist">
63        <copy file="${plugin.jar}" todir="${josm.home.dir}/plugins" />
64    </target>
65    <target name="init">
66        <echo>java version: ${java.version}</echo>
67    </target>
68    <target name="clean">
69        <delete dir="${plugin.site.file}" />
70        <delete dir="${plugin.build.dir}" />
71        <delete file="${plugin.jar}" />
72    </target>
73<!-- write site description for the given plugin so josm will accept it -->
74    <target name="site">
75        <echo message="creating site description in ${plugin.site.file}"/>
76        <echo file="${plugin.site.file}">&lt;!-- plugins available on this site -->
77  &lt;plugins>
78  &lt;plugin id="${ant.project.name}" version="${plugin.version}">
79  &lt;name>${ant.project.name}&lt;/name>
80  &lt;description>${plugin.description}&lt;/description>
81  &lt;resource>${plugin.site.url}${plugin.jar}&lt;/resource>
82  &lt;/plugin>
83  &lt;/plugins>
84</echo>
85    </target>
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}"
104target="${josm.home.dir}/plugins/${plugin.jar}"/>
105&lt;/resources>
106&lt;/plugin>
107&lt;/plugins>
108&lt;/site>
109</echo>
110    </target>
111<!-- upload the site description and the jar file via ssh -->
112    <target name="upload" depends="dist,site">
113        <echo message="uploading jar and site description to ${plugin.site.upload.target}"/>
114        <exec executable="scp">
115            <arg value="${plugin.jar}"/>
116            <arg value="${plugin.site.file}"/>
117            <arg value="${plugin.site.upload.target}"/>
118        </exec>
119    </target>
120</project>
Note: See TracBrowser for help on using the repository browser.