source: josm/trunk/build.xml@ 7133

Last change on this file since 7133 was 7133, checked in by Don-vip, 10 years ago

remove generated Java files from SVN, integrate JAXB 2.2.7 to build them during compilation

File size: 25.1 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<!-- ** build.xml - main ant file for JOSM
3**
4** To build run
5** ant clean
6** ant dist
7** This will create 'josm-custom.jar' in directory 'dist'. See also
8** https://josm.openstreetmap.de/wiki/CreateBuild
9**
10-->
11<project xmlns:as="antlib:org.codehaus.mojo.animal_sniffer" name="josm" default="dist" basedir="." xmlns:jacoco="antlib:org.jacoco.ant">
12 <property name="test.dir" location="test"/>
13 <property name="src.dir" location="src"/>
14 <property name="build.dir" location="build"/>
15 <property name="javacc.home" location="tools"/>
16 <property name="mapcss.dir" location="${src.dir}/org/openstreetmap/josm/gui/mappaint/mapcss"/>
17 <property name="imagerytypes.dir" location="${src.dir}/org/openstreetmap/josm/data/imagery/types"/>
18 <!-- build parameter: compression level (ant -Dclevel=N)
19 N ranges from 0 (no compression) to 9 (maximum compression)
20 default: 9 -->
21 <condition property="clevel" value="${clevel}" else="9">
22 <isset property="clevel"/>
23 </condition>
24 <!-- Java classpath addition (all jar files to compile tests with this) -->
25 <path id="classpath">
26 <fileset dir="lib">
27 <include name="**/*.jar"/>
28 </fileset>
29 </path>
30
31 <!--
32 ** Used by Eclipse ant builder for updating
33 ** the REVISION file used by JOSM
34 -->
35 <target name="create-revision-eclipse">
36 <property name="revision.dir" value="bin"/>
37 <antcall target="create-revision"/>
38 </target>
39 <!--
40 ** Initializes the REVISION.XML file from SVN information
41 -->
42 <target name="init-svn-revision-xml">
43 <exec append="false" output="REVISION.XML" executable="svn" failifexecutionfails="false" resultproperty="svn.info.result">
44 <env key="LANG" value="C"/>
45 <arg value="info"/>
46 <arg value="--xml"/>
47 <arg value="."/>
48 </exec>
49 <condition property="svn.info.success">
50 <equals arg1="${svn.info.result}" arg2="0" />
51 </condition>
52 </target>
53 <!--
54 ** Initializes the REVISION.XML file from git information
55 -->
56 <target name="init-git-revision-xml" unless="svn.info.success">
57 <exec append="false" output="REVISION.XML" executable="git" failifexecutionfails="false">
58 <arg value="log"/>
59 <arg value="-1"/>
60 <arg value="--grep=git-svn-id"/>
61 <!--
62 %B: raw body (unwrapped subject and body)
63 %n: new line
64 %ai: author date, ISO 8601 format
65 -->
66 <arg value="--pretty=format:%B%n%ai"/>
67 <arg value="HEAD"/>
68 </exec>
69 <replaceregexp file="REVISION.XML" flags="s"
70 match=".*git-svn-id: [^@]*@([0-9]+).*(\d{4}-\d{2}-\d{2}.\d{2}\:\d{2}\:\d{2}\s*[+-]\d{2}:?\d{2})\s*$"
71 replace="&lt;info&gt;&lt;entry&gt;&lt;commit revision=&quot;\1&quot;&gt;&lt;date&gt;\2&lt;/date&gt;&lt;/commit&gt;&lt;/entry&gt;&lt;/info&gt;"/>
72 </target>
73 <!--
74 ** Creates the REVISION file to be included in the distribution
75 -->
76 <target name="create-revision" depends="init-svn-revision-xml, init-git-revision-xml">
77 <property name="revision.dir" value="${build.dir}"/>
78 <xmlproperty file="REVISION.XML" prefix="version" keepRoot="false" collapseAttributes="true"/>
79 <delete file="REVISION.XML"/>
80 <tstamp>
81 <format property="build.tstamp" pattern="yyyy-MM-dd HH:mm:ss"/>
82 </tstamp>
83 <property name="version.entry.commit.revision" value="UNKNOWN"/>
84 <property name="version.entry.commit.date" value="UNKNOWN"/>
85 <mkdir dir="${revision.dir}"/>
86 <!-- add Build-Name: ... when making special builds, e.g. DEBIAN -->
87 <echo file="${revision.dir}/REVISION">
88# automatically generated by JOSM build.xml - do not edit
89Revision: ${version.entry.commit.revision}
90Is-Local-Build: true
91Build-Date: ${build.tstamp}
92</echo>
93 </target>
94 <!--
95 ** Check internal XML files against their XSD
96 -->
97 <target name="check-schemas">
98 <schemavalidate file="data/defaultpresets.xml" >
99 <schema namespace="http://josm.openstreetmap.de/tagging-preset-1.0" file="data/tagging-preset.xsd" />
100 </schemavalidate>
101 <schemavalidate file="styles/standard/elemstyles.xml" >
102 <schema namespace="http://josm.openstreetmap.de/mappaint-style-1.0" file="data/mappaint-style.xsd" />
103 </schemavalidate>
104 </target>
105 <!--
106 ** Main target that builds JOSM and checks XML against schemas
107 -->
108 <target name="dist" depends="compile,create-revision,check-schemas">
109 <echo>Revision ${version.entry.commit.revision}</echo>
110 <copy file="CONTRIBUTION" todir="build"/>
111 <copy file="README" todir="build"/>
112 <copy file="LICENSE" todir="build"/>
113 <!-- create josm-custom.jar -->
114 <delete file="dist/josm-custom.jar"/>
115 <jar destfile="dist/josm-custom.jar" basedir="build" level="${clevel}">
116 <!-- add attribute excludes="**/*BZip2*,**/*Bzip2*" to create a non-bzip2 supporting jar -->
117 <manifest>
118 <attribute name="Main-class" value="JOSM"/>
119 <attribute name="Main-Version" value="${version.entry.commit.revision} SVN"/>
120 <attribute name="Main-Date" value="${version.entry.commit.date}"/>
121 <attribute name="Permissions" value="all-permissions"/>
122 <attribute name="Codebase" value="josm.openstreetmap.de"/>
123 <attribute name="Application-Name" value="JOSM - Java OpenStreetMap Editor"/>
124 </manifest>
125 <zipfileset dir="images" prefix="images"/>
126 <zipfileset dir="data" prefix="data"/>
127 <zipfileset dir="styles" prefix="styles"/>
128 <zipfileset dir="${src.dir}/org/openstreetmap/gui/jmapviewer/images" prefix="org/openstreetmap/gui/jmapviewer/images"/>
129 <!-- All jar files necessary to run only JOSM (no tests) -->
130 <!-- <zipfileset src="lib/metadata-extractor-2.3.1-nosun.jar"/> -->
131 <!-- <zipfileset src="lib/signpost-core-1.2.1.1.jar"/> -->
132 </jar>
133 </target>
134 <!-- Mac OS X target -->
135 <target name="mac">
136 <!-- Using https://bitbucket.org/infinitekind/appbundler to create mac application bundle -->
137 <taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="tools/appbundler-1.0ea.jar"/>
138 <!-- create MacOS X application bundle -->
139 <bundleapp outputdirectory="${bundle.outdir}" name="JOSM" displayname="JOSM" executablename="JOSM" identifier="org.openstreetmap.josm"
140 mainclassname="org.openstreetmap.josm.gui.MainApplication"
141 copyright="JOSM, and all its integral parts, are released under the GNU General Public License v2 or later"
142 applicationCategory="public.app-category.utilities"
143 shortversion="${version.entry.commit.revision} SVN"
144 version="${version.entry.commit.revision} SVN"
145 icon="macosx/JOSM.app/Contents/Resources/JOSM.icns"
146 highResolutionCapable="true">
147
148 <arch name="x86_64"/>
149 <arch name="i386"/>
150
151 <classpath file="${bundle.jar}"/>
152
153 <option value="-Xmx512m"/>
154
155 <option value="-Xdock:icon=Contents/Resources/JOSM.icns"/>
156 <option value="-Xdock:name=JOSM"/>
157
158 <!-- OSX specific options, optional -->
159 <option value="-Dapple.laf.useScreenMenuBar=true"/>
160 <option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
161 <option value="-Dcom.apple.macos.useScreenMenuBar=true"/>
162 <option value="-Dcom.apple.mrj.application.apple.menu.about.name=JOSM"/>
163 <option value="-Dcom.apple.smallTabs=true"/>
164 </bundleapp>
165
166 <!-- appbundler lacks the possibility of defining our own keys or using a template, so update the .plist manually -->
167 <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask" classpath="tools/xmltask.jar"/>
168
169 <xmltask source="${bundle.outdir}/JOSM.app/Contents/Info.plist" dest="${bundle.outdir}/JOSM.app/Contents/Info.plist" indent="false">
170 <insert position="before" path="/plist/dict/key[1]"><![CDATA[<key>CFBundleAllowMixedLocalizations</key>
171<string>true</string>
172]]></insert>
173 </xmltask>
174
175 <!-- create ZIP file with MacOS X application bundle -->
176 <zip destfile="${bundle.outdir}/josm-custom-macosx.zip" update="true">
177 <zipfileset dir="." includes="CONTRIBUTION README LICENSE"/>
178 <zipfileset dir="${bundle.outdir}" includes="JOSM.app/**/*" filemode="755" />
179 </zip>
180 </target>
181 <target name="distmac" depends="dist">
182 <antcall target="mac">
183 <param name="bundle.outdir" value="dist"/>
184 <param name="bundle.jar" value="dist/josm-custom.jar"/>
185 </antcall>
186 </target>
187 <target name="javacc" depends="init" unless="javacc.notRequired">
188 <mkdir dir="${mapcss.dir}/parsergen"/>
189 <exec append="false" executable="java" failifexecutionfails="true">
190 <arg value="-cp"/>
191 <arg value="${javacc.home}/javacc.jar"/>
192 <arg value="javacc"/>
193 <arg value="-DEBUG_PARSER=false"/>
194 <arg value="-DEBUG_TOKEN_MANAGER=false"/>
195 <arg value="-JDK_VERSION=1.7"/>
196 <arg value="-GRAMMAR_ENCODING=UTF-8"/>
197 <arg value="-OUTPUT_DIRECTORY=${mapcss.dir}/parsergen"/>
198 <arg value="${mapcss.dir}/MapCSSParser.jj"/>
199 </exec>
200 </target>
201 <target name="jaxb" depends="init" unless="jaxb.notRequired">
202 <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
203 <classpath>
204 <fileset dir="tools/jaxb" includes="*.jar"/>
205 </classpath>
206 </taskdef>
207 <xjc schema="data_nodist/wms-cache.xsd" destdir="${src.dir}" encoding="UTF-8">
208 <depends dir="${src.dir}/org/openstreetmap/josm/data/imagery" includes="WmsCache.java"/>
209 <produces dir="${imagerytypes.dir}" includes="*.java"/>
210 </xjc>
211 </target>
212 <target name="compile" depends="init,javacc,jaxb">
213 <!-- COTS -->
214 <javac srcdir="${src.dir}" includes="com/**,oauth/**,org/apache/commons/codec/**,org/glassfish/**" nowarn="on"
215 destdir="build" target="1.7" source="1.7" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="iso-8859-1">
216 <!-- get rid of "internal proprietary API" warning -->
217 <compilerarg value="-XDignore.symbol.file"/>
218 </javac>
219 <!-- JMapViewer/JOSM -->
220 <javac srcdir="${src.dir}" excludes="com/**,oauth/**,org/apache/commons/codec/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/Demo.java"
221 destdir="build" target="1.7" source="1.7" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
222 <compilerarg value="-Xlint:cast"/>
223 <compilerarg value="-Xlint:deprecation"/>
224 <compilerarg value="-Xlint:dep-ann"/>
225 <compilerarg value="-Xlint:divzero"/>
226 <compilerarg value="-Xlint:empty"/>
227 <compilerarg value="-Xlint:finally"/>
228 <compilerarg value="-Xlint:overrides"/>
229 <!--<compilerarg value="-Xlint:rawtypes"/>-->
230 <compilerarg value="-Xlint:static"/>
231 <compilerarg value="-Xlint:try"/>
232 <compilerarg value="-Xlint:unchecked"/>
233 </javac>
234 <copy todir="build" failonerror="no" includeemptydirs="no">
235 <fileset dir="resources"/>
236 </copy>
237 </target>
238 <target name="init">
239 <uptodate property="javacc.notRequired" targetfile="${mapcss.dir}/parsergen/MapCSSParser.java" >
240 <srcfiles dir="${mapcss.dir}" includes="MapCSSParser.jj"/>
241 </uptodate>
242 <mkdir dir="build"/>
243 <mkdir dir="dist"/>
244 </target>
245 <target name="javadoc">
246 <javadoc destdir="javadoc"
247 sourcepath="${src.dir}"
248 encoding="UTF-8"
249 packagenames="org.openstreetmap.josm.*,org.openstreetmap.gui.jmapviewer.*"
250 windowtitle="JOSM"
251 use="true"
252 private="true"
253 linksource="true"
254 author="false">
255 <link href="http://docs.oracle.com/javase/7/docs/api"/>
256 <doctitle><![CDATA[<h2>JOSM - Javadoc</h2>]]></doctitle>
257 <bottom><![CDATA[<a href="https://josm.openstreetmap.de/">JOSM</a>]]></bottom>
258 </javadoc>
259 </target>
260 <target name="clean">
261 <delete dir="build"/>
262 <delete dir="dist"/>
263 <delete dir="${mapcss.dir}/parsergen"/>
264 <delete dir="${imagerytypes.dir}"/>
265 </target>
266 <path id="test.classpath">
267 <fileset dir="${test.dir}/lib">
268 <include name="**/*.jar"/>
269 </fileset>
270 <fileset dir="lib">
271 <include name="**/*.jar"/>
272 </fileset>
273 <pathelement path="dist/josm-custom.jar"/>
274 <pathelement path="tools/groovy-all-2.2.2.jar"/>
275 </path>
276 <macrodef name="init-test-preferences">
277 <attribute name="testfamily"/>
278 <sequential>
279 <copy file="${test.dir}/config/preferences.template.xml" tofile="${test.dir}/config/@{testfamily}-josm.home/preferences.xml"/>
280 <replace file="${test.dir}/config/@{testfamily}-josm.home/preferences.xml" encoding="UTF-8" token="@OSM_USERNAME@" value="${osm.username}"/>
281 <replace file="${test.dir}/config/@{testfamily}-josm.home/preferences.xml" encoding="UTF-8" token="@OSM_PASSWORD@" value="${osm.password}"/>
282 </sequential>
283 </macrodef>
284 <target name="test-init">
285 <mkdir dir="${test.dir}/build"/>
286 <mkdir dir="${test.dir}/build/unit"/>
287 <mkdir dir="${test.dir}/build/functional"/>
288 <mkdir dir="${test.dir}/build/performance"/>
289 <mkdir dir="${test.dir}/report"/>
290 <init-test-preferences testfamily="unit"/>
291 <init-test-preferences testfamily="functional"/>
292 <init-test-preferences testfamily="performance"/>
293 </target>
294 <target name="test-clean">
295 <delete dir="${test.dir}/build"/>
296 <delete dir="${test.dir}/report"/>
297 <delete file="${test.dir}/jacoco.exec" />
298 <delete file="${test.dir}/config/unit-josm.home/preferences.xml" />
299 <delete file="${test.dir}/config/functional-josm.home/preferences.xml" />
300 <delete file="${test.dir}/config/performance-josm.home/preferences.xml" />
301 <delete dir="${test.dir}/config/unit-josm.home/cache" failonerror="false"/>
302 <delete dir="${test.dir}/config/functional-josm.home/cache" failonerror="false"/>
303 <delete dir="${test.dir}/config/performance-josm.home/cache" failonerror="false"/>
304 </target>
305 <macrodef name="call-groovyc">
306 <attribute name="testfamily"/>
307 <element name="cp-elements"/>
308 <sequential>
309 <groovyc srcdir="${test.dir}/@{testfamily}" destdir="${test.dir}/build/@{testfamily}" encoding="UTF-8">
310 <classpath>
311 <cp-elements/>
312 </classpath>
313 <javac target="1.7" source="1.7" debug="on">
314 <compilerarg value="-Xlint:all"/>
315 <compilerarg value="-Xlint:-serial"/>
316 </javac>
317 </groovyc>
318 </sequential>
319 </macrodef>
320 <target name="test-compile" depends="test-init,dist">
321 <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpath="tools/groovy-all-2.2.2.jar"/>
322 <call-groovyc testfamily="unit">
323 <cp-elements>
324 <path refid="test.classpath"/>
325 </cp-elements>
326 </call-groovyc>
327 <call-groovyc testfamily="functional">
328 <cp-elements>
329 <path refid="test.classpath"/>
330 <pathelement path="${test.dir}/build/unit"/>
331 </cp-elements>
332 </call-groovyc>
333 <call-groovyc testfamily="performance">
334 <cp-elements>
335 <path refid="test.classpath"/>
336 <pathelement path="${test.dir}/build/unit"/>
337 </cp-elements>
338 </call-groovyc>
339 </target>
340 <macrodef name="call-junit">
341 <attribute name="testfamily"/>
342 <sequential>
343 <echo message="Running @{testfamily} tests with JUnit"/>
344 <jacoco:coverage destfile="${test.dir}/jacoco.exec">
345 <junit printsummary="yes" fork="true" forkmode="once">
346 <sysproperty key="josm.home" value="${test.dir}/config/@{testfamily}-josm.home"/>
347 <sysproperty key="josm.test.data" value="${test.dir}/data"/>
348 <sysproperty key="java.awt.headless" value="true"/>
349 <sysproperty key="suppressPermanentFailure" value="${suppressPermanentFailure}"/>
350 <classpath>
351 <path refid="test.classpath"/>
352 <pathelement path="${test.dir}/build/unit"/>
353 <pathelement path="${test.dir}/build/@{testfamily}"/>
354 <pathelement path="${test.dir}/config"/>
355 </classpath>
356 <formatter type="plain"/>
357 <formatter type="xml"/>
358 <batchtest fork="yes" todir="${test.dir}/report">
359 <fileset dir="${test.dir}/build/@{testfamily}" includes="**/*Test.class"/>
360 </batchtest>
361 </junit>
362 </jacoco:coverage>
363 </sequential>
364 </macrodef>
365 <target name="test" depends="test-compile"
366 description="Run unit, functional and performance tests. OSM API (TEST) account shall be set with -Dosm.username and -Dosm.password">
367 <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpath="tools/jacocoant.jar" />
368 <call-junit testfamily="unit"/>
369 <call-junit testfamily="functional"/>
370 <call-junit testfamily="performance"/>
371 </target>
372 <target name="test-html" depends="test" description="Generate HTML test reports">
373 <!-- May require additional ant dependencies like ant-trax package -->
374 <junitreport todir="${test.dir}/report">
375 <fileset dir="${test.dir}/report">
376 <include name="TEST-*.xml"/>
377 </fileset>
378 <report todir="${test.dir}/report/html"/>
379 </junitreport>
380 <jacoco:report>
381 <executiondata>
382 <file file="${test.dir}/jacoco.exec"/>
383 </executiondata>
384 <structure name="JOSM Test Coverage">
385 <classfiles>
386 <fileset dir="${build.dir}" includes="org/openstreetmap/"/>
387 </classfiles>
388 <sourcefiles encoding="UTF-8">
389 <fileset dir="${src.dir}" includes="org/openstreetmap/"/>
390 </sourcefiles>
391 </structure>
392 <html destdir="${test.dir}/report/jacoco"/>
393 </jacoco:report>
394 </target>
395 <target name="dist-optimized" depends="dist">
396 <taskdef resource="proguard/ant/task.properties" classpath="tools/proguard.jar"/>
397 <proguard>
398 -injars dist/josm-custom.jar
399 -outjars dist/josm-custom-optimized.jar
400
401 -libraryjars ${java.home}/lib/rt.jar
402 -libraryjars ${java.home}/lib/jce.jar
403
404 -dontoptimize
405 -dontobfuscate
406
407 # These options probably are not necessary (and make processing a bit slower)
408 -dontskipnonpubliclibraryclasses
409 -dontskipnonpubliclibraryclassmembers
410
411 -keepclasseswithmembers public class org.openstreetmap.josm.gui.MainApplication {
412 public static void main(java.lang.String[]);
413 }
414 -keepclasseswithmembers public class org.openstreetmap.josm.gui.MainApplet
415
416 -keep class JOSM
417 -keep class * extends org.openstreetmap.josm.io.FileImporter
418 -keep class * extends org.openstreetmap.josm.io.FileExporter
419 -keep class org.openstreetmap.josm.data.imagery.types.Adapter1
420 -keep class org.openstreetmap.josm.actions.search.SearchCompiler$Never
421
422 -keepclassmembers enum * {
423 public static **[] values();
424 public static ** valueOf(java.lang.String);
425 }
426
427 # Keep unused public methods (can be useful for plugins)
428 -keepclassmembers class * {
429 public protected *;
430 }
431
432 # Disable annoying [proguard] Note: the configuration keeps the entry point '...', but not the descriptor class '...'. This notes should not be a problem as we don't use obfuscation
433 -dontnote
434 </proguard>
435 </target>
436 <target name="check-plugins" depends="dist-optimized">
437 <echo message="Check of plugins binary compatibility (needs ant 1.8)"/>
438 <local name="dir"/>
439 <local name="plugins"/>
440 <property name="dir" value="plugin-check"/>
441 <typedef uri="antlib:org.codehaus.mojo.animal_sniffer">
442 <classpath path="tools/animal-sniffer-ant-tasks-1.8.jar"/>
443 </typedef>
444 <mkdir dir="${dir}"/>
445 <!-- List of deprecated plugins -->
446 <loadfile property="deprecated-plugins" srcFile="${src.dir}/org/openstreetmap/josm/plugins/PluginHandler.java">
447 <filterchain>
448 <linecontains>
449 <contains value="new DeprecatedPlugin("/>
450 </linecontains>
451 <tokenfilter>
452 <replaceregex pattern=".*new DeprecatedPlugin\(&quot;(.+?)&quot;.*" replace="\1|" flags="gi"/>
453 </tokenfilter>
454 <striplinebreaks/>
455 <tokenfilter>
456 <replaceregex pattern="\|$" replace="" flags="gi"/>
457 </tokenfilter>
458 </filterchain>
459 </loadfile>
460 <!-- Download list of plugins -->
461 <loadresource property="plugins">
462 <url url="https://josm.openstreetmap.de/plugin"/>
463 <filterchain>
464 <linecontainsregexp negate="true">
465 <regexp pattern="^\t.*"/>
466 </linecontainsregexp>
467 <linecontainsregexp negate="true">
468 <regexp pattern="${deprecated-plugins}"/>
469 </linecontainsregexp>
470 <tokenfilter>
471 <replaceregex pattern="^.*;" replace="" flags="gi"/>
472 </tokenfilter>
473 </filterchain>
474 </loadresource>
475 <!-- Delete files that are not in plugin list (like old plugins) -->
476 <loadresource property="file-list">
477 <propertyresource name="plugins"/>
478 <filterchain>
479 <tokenfilter>
480 <replaceregex pattern="^.*/(.*)$" replace="\1\|" flags=""/>
481 </tokenfilter>
482 <striplinebreaks/>
483 <tokenfilter>
484 <replaceregex pattern="\|$" replace="" flags="gi"/>
485 </tokenfilter>
486 </filterchain>
487 </loadresource>
488 <delete>
489 <restrict>
490 <fileset dir="${dir}"/>
491 <not>
492 <name regex="${file-list}"/>
493 </not>
494 </restrict>
495 </delete>
496 <!-- Download plugins -->
497 <copy todir="${dir}" flatten="true">
498 <resourcelist>
499 <string value="${plugins}"/>
500 </resourcelist>
501 </copy>
502 <!-- Check plugins -->
503 <as:build-signatures destfile="${dir}/api.sig">
504 <path>
505 <fileset file="dist/josm-custom-optimized.jar"/>
506 <fileset file="${java.home}/lib/rt.jar"/>
507 <fileset file="${java.home}/lib/jce.jar"/>
508 </path>
509 </as:build-signatures>
510 <as:check-signature signature="${dir}/api.sig">
511 <ignore classname="org.jgraph.*"/>
512 <ignore classname="com.touchgraph.*"/>
513 <ignore classname="com.sun.xml.fastinfoset.*"/>
514 <ignore classname="javax.jms.*"/>
515 <ignore classname="org.jvnet.staxex.*"/>
516 <ignore classname="javax.mail.*"/>
517 <ignore classname="com.sun.jdmk.*"/>
518 <ignore classname="org.apache.avalon.framework.logger.Logger"/>
519 <ignore classname="org.apache.log.*"/>
520 <ignore classname="junit.*"/>
521 <path path="${dir}"/>
522 </as:check-signature>
523 </target>
524
525 <target name="findbugs" depends="dist">
526 <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="tools/findbugs/findbugs-ant.jar"/>
527 <path id="findbugs-classpath">
528 <fileset dir="tools/findbugs/">
529 <include name="*.jar"/>
530 </fileset>
531 </path>
532 <property name="findbugs-classpath" refid="findbugs-classpath"/>
533 <findbugs output="xml"
534 outputFile="findbugs-josm.xml"
535 classpath="${findbugs-classpath}"
536 pluginList=""
537 excludeFilter="tools/findbugs/josm-filter.xml"
538 effort="max"
539 >
540 <sourcePath path="${basedir}/src" />
541 <class location="${basedir}/dist/josm-custom.jar" />
542 </findbugs>
543 </target>
544 <target name="run" depends="dist">
545 <java jar="dist/josm-custom.jar" fork="true">
546 <arg value="--set=expert=true"/>
547 <arg value="--set=remotecontrol.enabled=true"/>
548 <arg value="--set=debug.edt-checker.enable=false"/>
549 <jvmarg value="-Djosm.home=/tmp/.josm/"/>
550 </java>
551 </target>
552
553</project>
Note: See TracBrowser for help on using the repository browser.