source: osm/applications/editors/josm/plugins/CustomizePublicTransportStop/build.xml@ 34038

Last change on this file since 34038 was 34038, checked in by donvip, 7 years ago

add new javadoc ant target for plugins

File size: 5.3 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project name="josm-CustomizePublicTransportStop-plugin" default="dist" basedir=".">
3
4 <property name="ant.build.javac.target" value="1.8"/>
5 <property name="ant.build.javac.source" value="1.8"/>
6
7 <property name="plugin.build.dir" value="build" />
8 <property name="plugin.src.dir" value="src" />
9 <property name="plugin.dist.dir" value="../../dist" />
10 <property name="plugin.jar" value="${plugin.dist.dir}/CustomizePublicTransportStop.jar" />
11 <property name="josm" location="../../core/dist/josm-custom.jar"/>
12
13 <target name="init">
14 <available file="build.properties" property="build.properties.present" />
15 <fail unless="build.properties.present">**
16 ** Property file 'build.properties' doesn't exist.
17 ** Create a copy from 'build.properties.template' and update the properties
18 ** according to your local environment.
19 </fail>
20 <property file="build.properties" />
21
22 <path id="compile.path">
23 <pathelement location="${josm}" />
24 </path>
25
26 <mkdir dir="${plugin.build.dir}" />
27 </target>
28
29 <target name="compile" depends="init">
30 <echo message="compiling sources for ${plugin.jar} ... " />
31 <echo>Classpath includes ${josm}</echo>
32 <javac srcdir="src" classpathref="compile.path" debug="true" destdir="${plugin.build.dir}" includeantruntime="false" encoding="UTF-8">
33 <compilerarg value="-Xlint:deprecation" />
34 <compilerarg value="-Xlint:unchecked" />
35 </javac>
36 </target>
37 <target name="javadoc" depends="init">
38 <javadoc destdir="javadoc"
39 sourcepath="${plugin.src.dir}"
40 encoding="UTF-8"
41 windowtitle="${ant.project.name}"
42 use="true"
43 private="true"
44 linksource="true"
45 author="false">
46 <classpath refid="compile.path"/>
47 <link href="http://docs.oracle.com/javase/8/docs/api"/>
48 <link href="https://josm.openstreetmap.de/doc"/>
49 <doctitle><![CDATA[<h2>${ant.project.name} - Javadoc</h2>]]></doctitle>
50 <bottom><![CDATA[<a href="https://josm.openstreetmap.de/wiki/Plugins">JOSM Plugins</a>]]></bottom>
51 </javadoc>
52 </target>
53
54 <target name="dist" depends="clean,init,compile" description="Create the plugin jar">
55 <tstamp>
56 <format property="plugin.build.date" pattern="yyyy-MM-dd hh:mm aa" />
57 </tstamp>
58
59 <copy todir="${plugin.build.dir}/images">
60 <fileset dir="images">
61 <include name="**/*.png" />
62 </fileset>
63 </copy>
64 <copy todir="${plugin.build.dir}/data">
65 <fileset dir="data">
66 <include name="**/*.*" />
67 </fileset>
68 </copy>
69
70 <copy todir="${plugin.build.dir}">
71 <fileset dir=".">
72 <include name="README" />
73 <include name="LICENSE" />
74 <include name="README.*" />
75 <include name="GPL-v3.0.txt" />
76 <include name="GPL-v2.0.txt" />
77 </fileset>
78 </copy>
79
80 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
81 <manifest>
82 <attribute name="Author" value="Rodion Scherbakov" />
83 <attribute name="Plugin-Class" value="ru.rodsoft.openstreetmap.josm.plugins.customizepublictransportstop.CustomizePublicTransportStopPlugin" />
84 <attribute name="Plugin-Date" value="${plugin.build.date}" />
85 <attribute name="Plugin-Description" value="Customization of public public transport stops." />
86 <attribute name="Plugin-Icon" value="images/bus.png"/>
87 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/CustomizePublicTransportStop" />
88 <attribute name="Plugin-Mainversion" value="${josm.required.version}" />
89 <attribute name="Plugin-Version" value="0.4" />
90 <attribute name="ru_Plugin-Description" value="Настройка остановки общественного транспорта в соответствии со стандартом" />
91 </manifest>
92 </jar>
93 </target>
94
95 <target name="clean" description="Clean the build environment">
96 <delete dir="${plugin.build.dir}" />
97 </target>
98
99 <target name="osm-svn-install" depends="">
100 <echo>Installing the plugin in ${local.osm.svn.path}</echo>
101 <copy file="${plugin.jar}" todir="${local.osm.svn.path}" />
102 </target>
103
104 <!-- ************************************************************************************ -->
105 <!-- * Targets for compiling and running tests -->
106 <!-- ************************************************************************************ -->
107
108 <target name="dev-install" depends="dist">
109 <echo>Installing the plugin in ${local.install.path}</echo>
110 <copy file="${plugin.jar}" todir="C:\Users\bwr57_000\AppData\Roaming\JOSM\plugins" />
111 </target>
112
113 <target name="test"/>
114 <target name="checkstyle"/>
115 <target name="spotbugs"/>
116</project>
Note: See TracBrowser for help on using the repository browser.