source: osm/applications/editors/josm/plugins/czechaddress/build.xml@ 21804

Last change on this file since 21804 was 20558, checked in by jttt, 14 years ago

Change of JOSM api (Dataset.allPrimitives(), source ok, binary not compatible)

File size: 5.4 KB
Line 
1<project name="czechaddress" default="dist" basedir=".">
2 <property name="josm" location="../../core/dist/josm-custom.jar"/>
3 <property name="plugin.dist.dir" value="../../dist"/>
4 <property name="plugin.build.dir" value="build"/>
5 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
6 <property name="plugin.manifest" value="${plugin.build.dir}/org/openstreetmap/josm/plugins/czechaddress/MANIFEST.MF"/>
7 <property name="ant.build.javac.target" value="1.5"/>
8
9
10
11 <target name="clean" description="Removes all build files and the plugins's jar">
12 <delete dir="${plugin.build.dir}"/>
13 <delete file="${plugin.jar}"/>
14 </target>
15
16
17
18 <target name="init">
19 <mkdir dir="${plugin.build.dir}"/>
20 <mkdir dir="${plugin.dist.dir}"/>
21 </target>
22
23
24
25 <target name="compile" depends="init,revision"
26 description="Compile the plugin and make it ready for running">
27
28 <javac srcdir="src"
29 classpath="${josm}"
30 debug="true"
31 encoding="utf8"
32 destdir="${plugin.build.dir}">
33 <compilerarg value="-Xlint:deprecation"/>
34 <compilerarg value="-Xlint:unchecked"/>
35 </javac>
36
37 <copy todir="${plugin.build.dir}/images">
38 <fileset dir="images"/>
39 </copy>
40
41 <manifest file="${plugin.manifest}">
42 <attribute name="Author" value="Radomír Černoch"/>
43 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.czechaddress.CzechAddressPlugin"/>
44 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
45 <attribute name="Plugin-Description" value="Creating and handling address nodes and buildings within Czech Republic."/>
46 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/Cz:JOSM/Plugins/CzechAddress"/>
47 <attribute name="Plugin-Mainversion" value="3147"/>
48 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
49 </manifest>
50
51 </target>
52
53
54
55 <target name="dist" depends="compile">
56 <jar destfile="${plugin.jar}"
57 basedir ="${plugin.build.dir}"
58 manifest="${plugin.build.dir}/org/openstreetmap/josm/plugins/czechaddress/MANIFEST.MF"/>
59 </target>
60
61
62
63 <target name="revision">
64 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
65 <env key="LANG" value="C"/>
66 <arg value="info"/>
67 <arg value="--xml"/>
68 <arg value="."/>
69 </exec>
70 <xmlproperty file="REVISION" prefix="version"
71 keepRoot="false" collapseAttributes="true"/>
72 <delete file="REVISION"/>
73 </target>
74
75
76
77 <target name="install" depends="dist">
78 <property environment="env"/>
79 <condition property="josm.plugins.dir"
80 value="${env.APPDATA}/JOSM/plugins"
81 else="${user.home}/.josm/plugins">
82 <and><os family="windows"/></and>
83 </condition>
84 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
85 </target>
86
87
88
89 <target name="run" depends="compile">
90 <java classname="JOSM" fork="true">
91 <jvmarg value="-Xmx1024m"/>
92 <jvmarg value="-Xdebug"/>
93 <jvmarg value="-ea"/>
94 <classpath>
95 <pathelement location="${plugin.build.dir}"/>
96 <pathelement path="${java.class.path}"/>
97 </classpath>
98 <classpath>
99 <pathelement location="${josm}"/>
100 <pathelement path="${java.class.path}"/>
101 </classpath>
102 </java>
103 </target>
104
105
106
107 <target name="profile" depends="compile"
108 description="Profile CzechAddress with Netbeans">
109 <fail unless="netbeans.home">
110 This target can only run inside the NetBeans IDE.
111 </fail>
112 <nbprofiledirect>
113 <classpath>
114 <pathelement location="${plugin.build.dir}"/>
115 </classpath>
116 </nbprofiledirect>
117 <java classname="JOSM" fork="true">
118 <jvmarg value="${profiler.info.jvmargs.agent}"/>
119 <jvmarg value="-Xmx1024m"/>
120 <classpath>
121 <pathelement location="${plugin.build.dir}"/>
122 <pathelement path="${java.class.path}"/>
123 </classpath>
124 <classpath>
125 <pathelement location="${josm}"/>
126 <pathelement path="${java.class.path}"/>
127 </classpath>
128 </java>
129 </target>
130
131 <target name="debug" depends="compile"
132 description="Debug CzechAddress with Netbeans">
133 <nbjpdastart addressproperty="jpda.address"
134 name="czechaddress"
135 transport="dt_socket"/>
136 <java classname="JOSM" fork="true">
137 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
138 <jvmarg value="-Xmx1024m"/>
139 <jvmarg value="-Xdebug"/>
140 <jvmarg value="-ea"/>
141 <classpath>
142 <pathelement location="${plugin.build.dir}"/>
143 <pathelement path="${java.class.path}"/>
144 </classpath>
145 <classpath>
146 <pathelement location="${josm}"/>
147 <pathelement path="${java.class.path}"/>
148 </classpath>
149 </java>
150 </target>
151
152</project>
Note: See TracBrowser for help on using the repository browser.