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

Last change on this file since 19347 was 19347, checked in by jttt, 15 years ago

Fixed compilation problem

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