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

Last change on this file since 23863 was 22812, checked in by rcernoch, 14 years ago

CzechAddress: LocationSelector uses better method for selecting the desired region. THX to Libor!

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="3338"/>
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 <jvmarg value="-Djava.net.useSystemProxies=true"/>
95 <classpath>
96 <pathelement location="${plugin.build.dir}"/>
97 <pathelement path="${java.class.path}"/>
98 </classpath>
99 <classpath>
100 <pathelement location="${josm}"/>
101 <pathelement path="${java.class.path}"/>
102 </classpath>
103 </java>
104 </target>
105
106
107
108 <target name="profile" depends="compile"
109 description="Profile CzechAddress with Netbeans">
110 <fail unless="netbeans.home">
111 This target can only run inside the NetBeans IDE.
112 </fail>
113 <nbprofiledirect>
114 <classpath>
115 <pathelement location="${plugin.build.dir}"/>
116 </classpath>
117 </nbprofiledirect>
118 <java classname="JOSM" fork="true">
119 <jvmarg value="${profiler.info.jvmargs.agent}"/>
120 <jvmarg value="-Xmx1024m"/>
121 <classpath>
122 <pathelement location="${plugin.build.dir}"/>
123 <pathelement path="${java.class.path}"/>
124 </classpath>
125 <classpath>
126 <pathelement location="${josm}"/>
127 <pathelement path="${java.class.path}"/>
128 </classpath>
129 </java>
130 </target>
131
132 <target name="debug" depends="compile"
133 description="Debug CzechAddress with Netbeans">
134 <nbjpdastart addressproperty="jpda.address"
135 name="czechaddress"
136 transport="dt_socket"/>
137 <java classname="JOSM" fork="true">
138 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
139 <jvmarg value="-Xmx1024m"/>
140 <jvmarg value="-Xdebug"/>
141 <jvmarg value="-ea"/>
142 <classpath>
143 <pathelement location="${plugin.build.dir}"/>
144 <pathelement path="${java.class.path}"/>
145 </classpath>
146 <classpath>
147 <pathelement location="${josm}"/>
148 <pathelement path="${java.class.path}"/>
149 </classpath>
150 </java>
151 </target>
152
153</project>
Note: See TracBrowser for help on using the repository browser.