[4166] | 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
|
---|
[7133] | 7 | ** This will create 'josm-custom.jar' in directory 'dist'. See also
|
---|
[7183] | 8 | ** https://josm.openstreetmap.de/wiki/DevelopersGuide/CreateBuild
|
---|
[4166] | 9 | **
|
---|
| 10 | -->
|
---|
[13505] | 11 | <project xmlns:as="antlib:org.codehaus.mojo.animal_sniffer" name="josm" default="dist" xmlns:jacoco="antlib:org.jacoco.ant" xmlns:if="ant:if" xmlns:unless="ant:unless">
|
---|
[9765] | 12 | <target name="init-properties">
|
---|
[13641] | 13 | <property environment="env"/>
|
---|
[9765] | 14 | <!-- Load properties in a target and not at top level, so this build file can be
|
---|
| 15 | imported from an IDE ant file (Netbeans) without messing up IDE properties.
|
---|
| 16 | When imported from another file, ${basedir} will point to the parent directory
|
---|
| 17 | of the importing ant file. Use ${base.dir} instead, which is always the parent
|
---|
| 18 | directory of this file. -->
|
---|
| 19 | <dirname property="base.dir" file="${ant.file.josm}"/>
|
---|
| 20 | <property name="test.dir" location="${base.dir}/test"/>
|
---|
| 21 | <property name="src.dir" location="${base.dir}/src"/>
|
---|
[13819] | 22 | <condition property="noJavaFX">
|
---|
| 23 | <or>
|
---|
[13642] | 24 | <isset property="env.JOSM_NOJAVAFX"/>
|
---|
[13819] | 25 | <not>
|
---|
| 26 | <available classname="javafx.scene.media.Media"/>
|
---|
| 27 | </not>
|
---|
| 28 | </or>
|
---|
[13641] | 29 | </condition>
|
---|
[9765] | 30 | <property name="build.dir" location="${base.dir}/build"/>
|
---|
| 31 | <property name="dist.dir" location="${base.dir}/dist"/>
|
---|
[13209] | 32 | <property name="tools.dir" location="${base.dir}/tools"/>
|
---|
| 33 | <property name="pmd.dir" location="${tools.dir}/pmd"/>
|
---|
| 34 | <property name="checkstyle.dir" location="${tools.dir}/checkstyle"/>
|
---|
| 35 | <property name="spotbugs.dir" location="${tools.dir}/spotbugs"/>
|
---|
| 36 | <property name="javacc.home" location="${tools.dir}"/>
|
---|
[9765] | 37 | <property name="mapcss.dir" location="${src.dir}/org/openstreetmap/josm/gui/mappaint/mapcss"/>
|
---|
| 38 | <property name="proj-build.dir" location="${base.dir}/build2"/>
|
---|
[12582] | 39 | <property name="checkstyle-build.dir" location="${base.dir}/build2"/>
|
---|
[9765] | 40 | <property name="epsg.output" location="${base.dir}/data/projection/custom-epsg"/>
|
---|
[13209] | 41 | <property name="groovy.jar" location="${tools.dir}/groovy-all.jar"/>
|
---|
| 42 | <property name="error_prone_ant.jar" location="${tools.dir}/error_prone_ant.jar"/>
|
---|
[12628] | 43 | <property name="dist.jar" location="${dist.dir}/josm-custom.jar"/>
|
---|
| 44 | <property name="dist-optimized.jar" location="${dist.dir}/josm-custom-optimized.jar"/>
|
---|
| 45 | <property name="java.lang.version" value="1.8" />
|
---|
[13103] | 46 | <property name="jacoco.includes" value="org.openstreetmap.josm.*" />
|
---|
[13097] | 47 | <property name="jacoco.inclbootstrapclasses" value="false" />
|
---|
| 48 | <property name="jacoco.inclnolocationclasses" value="false" />
|
---|
[9765] | 49 | <!-- build parameter: compression level (ant -Dclevel=N)
|
---|
| 50 | N ranges from 0 (no compression) to 9 (maximum compression)
|
---|
| 51 | default: 9 -->
|
---|
| 52 | <condition property="clevel" value="${clevel}" else="9">
|
---|
| 53 | <isset property="clevel"/>
|
---|
| 54 | </condition>
|
---|
| 55 | <!-- For Java9-specific stuff -->
|
---|
| 56 | <condition property="isJava9">
|
---|
[13073] | 57 | <matches string="${ant.java.version}" pattern="(1.)?(9|1[0-9])" />
|
---|
[9765] | 58 | </condition>
|
---|
[13492] | 59 | <!-- For Java10-specific stuff -->
|
---|
| 60 | <condition property="isJava10">
|
---|
| 61 | <matches string="${ant.java.version}" pattern="1[0-9]" />
|
---|
| 62 | </condition>
|
---|
[13505] | 63 | <!-- For Java11-specific stuff -->
|
---|
| 64 | <condition property="isJava11">
|
---|
| 65 | <matches string="${ant.java.version}" pattern="1[1-9]" />
|
---|
| 66 | </condition>
|
---|
[13492] | 67 | <!-- Disable error_prone on Java 10+, see https://github.com/google/error-prone/issues/860 -->
|
---|
| 68 | <condition property="javac.compiler" value="modern" else="com.google.errorprone.ErrorProneAntCompilerAdapter">
|
---|
| 69 | <isset property="isJava10"/>
|
---|
| 70 | </condition>
|
---|
[13523] | 71 | <!-- Disable jacoco on Java 11+, see https://github.com/jacoco/jacoco/issues/629 -->
|
---|
| 72 | <condition property="coverageByDefault">
|
---|
| 73 | <not>
|
---|
| 74 | <isset property="isJava11"/>
|
---|
| 75 | </not>
|
---|
| 76 | </condition>
|
---|
[9766] | 77 | <path id="test.classpath">
|
---|
| 78 | <fileset dir="${test.dir}/lib">
|
---|
| 79 | <include name="**/*.jar"/>
|
---|
| 80 | </fileset>
|
---|
[12628] | 81 | <pathelement path="${dist.jar}"/>
|
---|
[9766] | 82 | <pathelement path="${groovy.jar}"/>
|
---|
[13209] | 83 | <pathelement path="${spotbugs.dir}/spotbugs-annotations.jar"/>
|
---|
[9766] | 84 | </path>
|
---|
[11713] | 85 | <path id="pmd.classpath">
|
---|
[13209] | 86 | <fileset dir="${pmd.dir}">
|
---|
[11713] | 87 | <include name="*.jar"/>
|
---|
| 88 | </fileset>
|
---|
| 89 | </path>
|
---|
[9765] | 90 | </target>
|
---|
[4252] | 91 |
|
---|
[4166] | 92 | <!--
|
---|
[6133] | 93 | ** Used by Eclipse ant builder for updating
|
---|
| 94 | ** the REVISION file used by JOSM
|
---|
| 95 | -->
|
---|
[4166] | 96 | <target name="create-revision-eclipse">
|
---|
| 97 | <property name="revision.dir" value="bin"/>
|
---|
| 98 | <antcall target="create-revision"/>
|
---|
[12931] | 99 | <mkdir dir="bin/META-INF/services"/>
|
---|
| 100 | <echo encoding="UTF-8" file="bin/META-INF/services/java.text.spi.DecimalFormatSymbolsProvider">org.openstreetmap.josm.tools.JosmDecimalFormatSymbolsProvider</echo>
|
---|
[4166] | 101 | </target>
|
---|
| 102 | <!--
|
---|
[6540] | 103 | ** Initializes the REVISION.XML file from SVN information
|
---|
[6133] | 104 | -->
|
---|
[9765] | 105 | <target name="init-svn-revision-xml" depends="init-properties">
|
---|
| 106 | <exec append="false" output="${base.dir}/REVISION.XML" executable="svn" dir="${base.dir}" failifexecutionfails="false" resultproperty="svn.info.result">
|
---|
[4166] | 107 | <env key="LANG" value="C"/>
|
---|
| 108 | <arg value="info"/>
|
---|
| 109 | <arg value="--xml"/>
|
---|
| 110 | <arg value="."/>
|
---|
| 111 | </exec>
|
---|
[6585] | 112 | <condition property="svn.info.success">
|
---|
| 113 | <equals arg1="${svn.info.result}" arg2="0" />
|
---|
| 114 | </condition>
|
---|
[6540] | 115 | </target>
|
---|
| 116 | <!--
|
---|
| 117 | ** Initializes the REVISION.XML file from git information
|
---|
| 118 | -->
|
---|
[9765] | 119 | <target name="init-git-revision-xml" unless="svn.info.success" depends="init-properties">
|
---|
| 120 | <exec append="false" output="${base.dir}/REVISION.XML" executable="git" dir="${base.dir}" failifexecutionfails="false">
|
---|
[6540] | 121 | <arg value="log"/>
|
---|
| 122 | <arg value="-1"/>
|
---|
| 123 | <arg value="--grep=git-svn-id"/>
|
---|
[6545] | 124 | <!--
|
---|
| 125 | %B: raw body (unwrapped subject and body)
|
---|
| 126 | %n: new line
|
---|
| 127 | %ai: author date, ISO 8601 format
|
---|
| 128 | -->
|
---|
| 129 | <arg value="--pretty=format:%B%n%ai"/>
|
---|
[6540] | 130 | <arg value="HEAD"/>
|
---|
| 131 | </exec>
|
---|
[9765] | 132 | <replaceregexp file="${base.dir}/REVISION.XML" flags="s"
|
---|
[6545] | 133 | match=".*git-svn-id: [^@]*@([0-9]+).*(\d{4}-\d{2}-\d{2}.\d{2}\:\d{2}\:\d{2}\s*[+-]\d{2}:?\d{2})\s*$"
|
---|
| 134 | replace="<info><entry><commit revision="\1"><date>\2</date></commit></entry></info>"/>
|
---|
[6540] | 135 | </target>
|
---|
| 136 | <!--
|
---|
| 137 | ** Creates the REVISION file to be included in the distribution
|
---|
| 138 | -->
|
---|
[9765] | 139 | <target name="create-revision" depends="init-properties,init-svn-revision-xml,init-git-revision-xml">
|
---|
[6540] | 140 | <property name="revision.dir" value="${build.dir}"/>
|
---|
[9765] | 141 | <xmlproperty file="${base.dir}/REVISION.XML" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
| 142 | <delete file="${base.dir}/REVISION.XML"/>
|
---|
[4166] | 143 | <tstamp>
|
---|
| 144 | <format property="build.tstamp" pattern="yyyy-MM-dd HH:mm:ss"/>
|
---|
| 145 | </tstamp>
|
---|
| 146 | <property name="version.entry.commit.revision" value="UNKNOWN"/>
|
---|
[6540] | 147 | <property name="version.entry.commit.date" value="UNKNOWN"/>
|
---|
[4166] | 148 | <mkdir dir="${revision.dir}"/>
|
---|
[5362] | 149 | <!-- add Build-Name: ... when making special builds, e.g. DEBIAN -->
|
---|
[4166] | 150 | <echo file="${revision.dir}/REVISION">
|
---|
| 151 | # automatically generated by JOSM build.xml - do not edit
|
---|
| 152 | Revision: ${version.entry.commit.revision}
|
---|
| 153 | Is-Local-Build: true
|
---|
| 154 | Build-Date: ${build.tstamp}
|
---|
| 155 | </echo>
|
---|
| 156 | </target>
|
---|
[6540] | 157 | <!--
|
---|
| 158 | ** Check internal XML files against their XSD
|
---|
| 159 | -->
|
---|
[9765] | 160 | <target name="check-schemas" unless="check-schemas.notRequired" depends="init-properties">
|
---|
[6208] | 161 | <schemavalidate file="data/defaultpresets.xml" >
|
---|
| 162 | <schema namespace="http://josm.openstreetmap.de/tagging-preset-1.0" file="data/tagging-preset.xsd" />
|
---|
| 163 | </schemavalidate>
|
---|
| 164 | </target>
|
---|
[6540] | 165 | <!--
|
---|
| 166 | ** Main target that builds JOSM and checks XML against schemas
|
---|
| 167 | -->
|
---|
[9133] | 168 | <target name="dist" depends="compile,create-revision,check-schemas,epsg">
|
---|
[4166] | 169 | <echo>Revision ${version.entry.commit.revision}</echo>
|
---|
[12648] | 170 | <copy file="CONTRIBUTION" todir="${build.dir}"/>
|
---|
| 171 | <copy file="README" todir="${build.dir}"/>
|
---|
| 172 | <copy file="LICENSE" todir="${build.dir}"/>
|
---|
[4166] | 173 | <!-- create josm-custom.jar -->
|
---|
[12628] | 174 | <delete file="${dist.jar}"/>
|
---|
| 175 | <jar destfile="${dist.jar}" basedir="${build.dir}" level="${clevel}">
|
---|
[4166] | 176 | <!-- add attribute excludes="**/*BZip2*,**/*Bzip2*" to create a non-bzip2 supporting jar -->
|
---|
| 177 | <manifest>
|
---|
[11926] | 178 | <attribute name="Main-class" value="org.openstreetmap.josm.gui.MainApplication"/>
|
---|
[4166] | 179 | <attribute name="Main-Version" value="${version.entry.commit.revision} SVN"/>
|
---|
| 180 | <attribute name="Main-Date" value="${version.entry.commit.date}"/>
|
---|
[6341] | 181 | <attribute name="Permissions" value="all-permissions"/>
|
---|
| 182 | <attribute name="Codebase" value="josm.openstreetmap.de"/>
|
---|
| 183 | <attribute name="Application-Name" value="JOSM - Java OpenStreetMap Editor"/>
|
---|
[12205] | 184 | <!-- Java 9 stuff. Entries are safely ignored by Java 8 -->
|
---|
[12459] | 185 | <attribute name="Add-Exports" value="java.base/sun.security.util java.base/sun.security.x509 java.desktop/com.apple.eawt java.desktop/com.sun.imageio.spi javafx.graphics/com.sun.javafx.application jdk.deploy/com.sun.deploy.config" />
|
---|
[12932] | 186 | <attribute name="Add-Opens" value="java.base/java.lang java.base/java.nio java.base/jdk.internal.loader java.base/jdk.internal.ref java.desktop/javax.imageio.spi java.desktop/javax.swing.text.html java.prefs/java.util.prefs" />
|
---|
[4166] | 187 | </manifest>
|
---|
[12931] | 188 | <service type="java.text.spi.DecimalFormatSymbolsProvider" provider="org.openstreetmap.josm.tools.JosmDecimalFormatSymbolsProvider" />
|
---|
[4166] | 189 | <zipfileset dir="images" prefix="images"/>
|
---|
| 190 | <zipfileset dir="data" prefix="data"/>
|
---|
| 191 | <zipfileset dir="styles" prefix="styles"/>
|
---|
[7133] | 192 | <zipfileset dir="${src.dir}/org/openstreetmap/gui/jmapviewer/images" prefix="org/openstreetmap/gui/jmapviewer/images"/>
|
---|
[4166] | 193 | </jar>
|
---|
| 194 | </target>
|
---|
[7001] | 195 | <!-- Mac OS X target -->
|
---|
[9765] | 196 | <target name="mac" depends="init-properties">
|
---|
[6217] | 197 | <!-- Using https://bitbucket.org/infinitekind/appbundler to create mac application bundle -->
|
---|
[13209] | 198 | <taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${tools.dir}/appbundler-1.0ea.jar"/>
|
---|
[6217] | 199 | <!-- create MacOS X application bundle -->
|
---|
[6945] | 200 | <bundleapp outputdirectory="${bundle.outdir}" name="JOSM" displayname="JOSM" executablename="JOSM" identifier="org.openstreetmap.josm"
|
---|
[6216] | 201 | mainclassname="org.openstreetmap.josm.gui.MainApplication"
|
---|
[6217] | 202 | copyright="JOSM, and all its integral parts, are released under the GNU General Public License v2 or later"
|
---|
[6216] | 203 | applicationCategory="public.app-category.utilities"
|
---|
| 204 | shortversion="${version.entry.commit.revision} SVN"
|
---|
| 205 | version="${version.entry.commit.revision} SVN"
|
---|
| 206 | icon="macosx/JOSM.app/Contents/Resources/JOSM.icns"
|
---|
[6217] | 207 | highResolutionCapable="true">
|
---|
[6216] | 208 |
|
---|
| 209 | <arch name="x86_64"/>
|
---|
| 210 | <arch name="i386"/>
|
---|
| 211 |
|
---|
[6945] | 212 | <classpath file="${bundle.jar}"/>
|
---|
[6216] | 213 |
|
---|
[13722] | 214 | <option value="-Xmx2048m"/>
|
---|
[6216] | 215 |
|
---|
| 216 | <option value="-Xdock:icon=Contents/Resources/JOSM.icns"/>
|
---|
| 217 | <option value="-Xdock:name=JOSM"/>
|
---|
| 218 |
|
---|
| 219 | <!-- OSX specific options, optional -->
|
---|
| 220 | <option value="-Dapple.laf.useScreenMenuBar=true"/>
|
---|
| 221 | <option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
|
---|
| 222 | <option value="-Dcom.apple.macos.useScreenMenuBar=true"/>
|
---|
| 223 | <option value="-Dcom.apple.mrj.application.apple.menu.about.name=JOSM"/>
|
---|
| 224 | <option value="-Dcom.apple.smallTabs=true"/>
|
---|
| 225 | </bundleapp>
|
---|
[9765] | 226 |
|
---|
[6217] | 227 | <!-- appbundler lacks the possibility of defining our own keys or using a template, so update the .plist manually -->
|
---|
[13209] | 228 | <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask" classpath="${tools.dir}/xmltask.jar"/>
|
---|
[9765] | 229 |
|
---|
[6945] | 230 | <xmltask source="${bundle.outdir}/JOSM.app/Contents/Info.plist" dest="${bundle.outdir}/JOSM.app/Contents/Info.plist" indent="false">
|
---|
[7367] | 231 | <!-- remove empty CFBundleDocumentTypes definition -->
|
---|
| 232 | <remove path="/plist/dict/key[text()='CFBundleDocumentTypes']|/plist/dict/key[text()='CFBundleDocumentTypes']/following-sibling::array[1]"/>
|
---|
[7287] | 233 | <!-- insert our own keys -->
|
---|
| 234 | <insert position="before" path="/plist/dict/key[1]" file="macosx/JOSM.app/Contents/Info.plist_template.xml" />
|
---|
[6217] | 235 | </xmltask>
|
---|
[9765] | 236 |
|
---|
[6216] | 237 | <!-- create ZIP file with MacOS X application bundle -->
|
---|
[7001] | 238 | <zip destfile="${bundle.outdir}/josm-custom-macosx.zip" update="true">
|
---|
[6945] | 239 | <zipfileset dir="." includes="CONTRIBUTION README LICENSE"/>
|
---|
| 240 | <zipfileset dir="${bundle.outdir}" includes="JOSM.app/**/*" filemode="755" />
|
---|
[6216] | 241 | </zip>
|
---|
[6217] | 242 | </target>
|
---|
[7001] | 243 | <target name="distmac" depends="dist">
|
---|
| 244 | <antcall target="mac">
|
---|
[9765] | 245 | <param name="bundle.outdir" value="${dist.dir}"/>
|
---|
[12628] | 246 | <param name="bundle.jar" value="${dist.jar}"/>
|
---|
[6945] | 247 | </antcall>
|
---|
| 248 | </target>
|
---|
[7839] | 249 | <!-- Windows target -->
|
---|
| 250 | <target name="distwin" depends="dist">
|
---|
[7842] | 251 | <exec dir="windows" executable="./josm-setup-unix.sh">
|
---|
[7839] | 252 | <arg value="${version.entry.commit.revision}"/>
|
---|
[12628] | 253 | <arg value="${dist.jar}"/>
|
---|
[7839] | 254 | </exec>
|
---|
| 255 | </target>
|
---|
[5392] | 256 | <target name="javacc" depends="init" unless="javacc.notRequired">
|
---|
[4252] | 257 | <mkdir dir="${mapcss.dir}/parsergen"/>
|
---|
[11676] | 258 | <java classname="javacc" fork="true" failonerror="true">
|
---|
| 259 | <classpath path="${javacc.home}/javacc.jar"/>
|
---|
[7043] | 260 | <arg value="-DEBUG_PARSER=false"/>
|
---|
| 261 | <arg value="-DEBUG_TOKEN_MANAGER=false"/>
|
---|
[12628] | 262 | <arg value="-JDK_VERSION=${java.lang.version}"/>
|
---|
[6446] | 263 | <arg value="-GRAMMAR_ENCODING=UTF-8"/>
|
---|
[4257] | 264 | <arg value="-OUTPUT_DIRECTORY=${mapcss.dir}/parsergen"/>
|
---|
| 265 | <arg value="${mapcss.dir}/MapCSSParser.jj"/>
|
---|
[11676] | 266 | </java>
|
---|
[4252] | 267 | </target>
|
---|
[12648] | 268 | <target name="compile-cots" depends="init">
|
---|
[7068] | 269 | <!-- COTS -->
|
---|
[13352] | 270 | <javac srcdir="${src.dir}" includes="com/**,javax/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/tukaani/**,gnu/**" nowarn="on" encoding="iso-8859-1"
|
---|
[12648] | 271 | destdir="${build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on" includeAntRuntime="false" createMissingPackageInfoClass="false">
|
---|
[7019] | 272 | <!-- get rid of "internal proprietary API" warning -->
|
---|
[7068] | 273 | <compilerarg value="-XDignore.symbol.file"/>
|
---|
[12501] | 274 | <exclude name="org/apache/commons/compress/PasswordRequiredException.java"/>
|
---|
| 275 | <exclude name="org/apache/commons/compress/archivers/**"/>
|
---|
| 276 | <exclude name="org/apache/commons/compress/changes/**"/>
|
---|
[10832] | 277 | <exclude name="org/apache/commons/compress/compressors/bzip2/BZip2Utils.java"/>
|
---|
[12039] | 278 | <exclude name="org/apache/commons/compress/compressors/brotli/**"/>
|
---|
[8173] | 279 | <exclude name="org/apache/commons/compress/compressors/CompressorStreamFactory.java"/>
|
---|
[11274] | 280 | <exclude name="org/apache/commons/compress/compressors/CompressorStreamProvider.java"/>
|
---|
[10832] | 281 | <exclude name="org/apache/commons/compress/compressors/CompressorException.java"/>
|
---|
| 282 | <exclude name="org/apache/commons/compress/compressors/FileNameUtil.java"/>
|
---|
[8173] | 283 | <exclude name="org/apache/commons/compress/compressors/deflate/**"/>
|
---|
| 284 | <exclude name="org/apache/commons/compress/compressors/gzip/**"/>
|
---|
[11471] | 285 | <exclude name="org/apache/commons/compress/compressors/lz4/**"/>
|
---|
[13351] | 286 | <exclude name="org/apache/commons/compress/compressors/lzma/**"/>
|
---|
[11478] | 287 | <exclude name="org/apache/commons/compress/compressors/lz77support/**"/>
|
---|
[8173] | 288 | <exclude name="org/apache/commons/compress/compressors/pack200/**"/>
|
---|
| 289 | <exclude name="org/apache/commons/compress/compressors/snappy/**"/>
|
---|
[13352] | 290 | <exclude name="org/apache/commons/compress/compressors/xz/XZUtils.java"/>
|
---|
[8173] | 291 | <exclude name="org/apache/commons/compress/compressors/z/**"/>
|
---|
[13011] | 292 | <exclude name="org/apache/commons/compress/compressors/zstandard/**"/>
|
---|
[12501] | 293 | <exclude name="org/apache/commons/compress/parallel/**"/>
|
---|
[11569] | 294 | <exclude name="org/apache/commons/compress/utils/ArchiveUtils.java"/>
|
---|
[10833] | 295 | <exclude name="org/apache/commons/jcs/JCS.java"/>
|
---|
[10866] | 296 | <exclude name="org/apache/commons/jcs/access/GroupCacheAccess.java"/>
|
---|
[10833] | 297 | <exclude name="org/apache/commons/jcs/access/PartitionedCacheAccess.java"/>
|
---|
[10866] | 298 | <exclude name="org/apache/commons/jcs/access/behavior/IGroupCacheAccess.java"/>
|
---|
| 299 | <exclude name="org/apache/commons/jcs/access/exception/InvalidGroupException.java"/>
|
---|
[10833] | 300 | <exclude name="org/apache/commons/jcs/admin/servlet/**"/>
|
---|
[10866] | 301 | <exclude name="org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheMonitor.java"/>
|
---|
[8173] | 302 | <exclude name="org/apache/commons/jcs/auxiliary/disk/jdbc/**"/>
|
---|
[10866] | 303 | <exclude name="org/apache/commons/jcs/auxiliary/lateral/**"/>
|
---|
[8173] | 304 | <exclude name="org/apache/commons/jcs/auxiliary/remote/**"/>
|
---|
[10866] | 305 | <exclude name="org/apache/commons/jcs/engine/CacheAdaptor.java"/>
|
---|
| 306 | <exclude name="org/apache/commons/jcs/engine/CacheGroup.java"/>
|
---|
| 307 | <exclude name="org/apache/commons/jcs/engine/CacheWatchRepairable.java"/>
|
---|
[10833] | 308 | <exclude name="org/apache/commons/jcs/engine/Zombie*.java"/>
|
---|
[10866] | 309 | <exclude name="org/apache/commons/jcs/engine/logging/CacheEventLoggerDebugLogger.java"/>
|
---|
[10833] | 310 | <exclude name="org/apache/commons/jcs/utils/access/**"/>
|
---|
| 311 | <exclude name="org/apache/commons/jcs/utils/discovery/**"/>
|
---|
| 312 | <exclude name="org/apache/commons/jcs/utils/net/**"/>
|
---|
| 313 | <exclude name="org/apache/commons/jcs/utils/props/**"/>
|
---|
[8173] | 314 | <exclude name="org/apache/commons/jcs/utils/servlet/**"/>
|
---|
| 315 | <exclude name="org/apache/commons/logging/impl/AvalonLogger.java"/>
|
---|
| 316 | <exclude name="org/apache/commons/logging/impl/Jdk13LumberjackLogger.java"/>
|
---|
| 317 | <exclude name="org/apache/commons/logging/impl/Log4JLogger.java"/>
|
---|
| 318 | <exclude name="org/apache/commons/logging/impl/LogKitLogger.java"/>
|
---|
| 319 | <exclude name="org/apache/commons/logging/impl/ServletContextCleaner.java"/>
|
---|
[7019] | 320 | </javac>
|
---|
[12648] | 321 | </target>
|
---|
| 322 | <target name="compile-jmapviewer" depends="init">
|
---|
[8526] | 323 | <!-- JMapViewer -->
|
---|
[10628] | 324 | <javac compiler="${javac.compiler}" sourcepath="" srcdir="${src.dir}"
|
---|
[13352] | 325 | excludes="com/**,javax/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/Demo.java,org/openstreetmap/gui/jmapviewer/JMapViewerTree.java,org/openstreetmap/gui/jmapviewer/checkBoxTree/**,org/openstreetmap/josm/**,org/tukaani/**,gnu/**"
|
---|
[12648] | 326 | destdir="${build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
|
---|
[10581] | 327 | <compilerclasspath>
|
---|
| 328 | <pathelement location="${error_prone_ant.jar}"/>
|
---|
| 329 | </compilerclasspath>
|
---|
[7021] | 330 | <compilerarg value="-Xlint:cast"/>
|
---|
[4166] | 331 | <compilerarg value="-Xlint:deprecation"/>
|
---|
[7022] | 332 | <compilerarg value="-Xlint:dep-ann"/>
|
---|
| 333 | <compilerarg value="-Xlint:divzero"/>
|
---|
| 334 | <compilerarg value="-Xlint:empty"/>
|
---|
| 335 | <compilerarg value="-Xlint:finally"/>
|
---|
| 336 | <compilerarg value="-Xlint:overrides"/>
|
---|
| 337 | <!--<compilerarg value="-Xlint:rawtypes"/>-->
|
---|
| 338 | <compilerarg value="-Xlint:static"/>
|
---|
| 339 | <compilerarg value="-Xlint:try"/>
|
---|
[4166] | 340 | <compilerarg value="-Xlint:unchecked"/>
|
---|
[7367] | 341 | <!-- Undocumented argument to ignore "Sun internal proprietary API" warning, see http://stackoverflow.com/a/13862308/2257172 -->
|
---|
[7351] | 342 | <compilerarg value="-XDignore.symbol.file"/>
|
---|
[10704] | 343 | <compilerarg value="-Xep:ReferenceEquality:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
|
---|
[13304] | 344 | <compilerarg value="-Xep:StringSplitter:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
|
---|
[10659] | 345 | <compilerarg line="-Xmaxwarns 1000"/>
|
---|
[4166] | 346 | </javac>
|
---|
[12648] | 347 | </target>
|
---|
| 348 | <target name="compile" depends="init,javacc,compile-cots,compile-jmapviewer">
|
---|
[8526] | 349 | <!-- JOSM -->
|
---|
[12582] | 350 | <javac compiler="${javac.compiler}" sourcepath="" srcdir="${src.dir}"
|
---|
[13352] | 351 | excludes="com/**,javax/**,gnu/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/**,org/tukaani/**"
|
---|
[12648] | 352 | destdir="${build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
|
---|
[10581] | 353 | <compilerclasspath>
|
---|
| 354 | <pathelement location="${error_prone_ant.jar}"/>
|
---|
| 355 | </compilerclasspath>
|
---|
[8526] | 356 | <compilerarg value="-Xlint:cast"/>
|
---|
| 357 | <compilerarg value="-Xlint:deprecation"/>
|
---|
| 358 | <compilerarg value="-Xlint:dep-ann"/>
|
---|
| 359 | <compilerarg value="-Xlint:divzero"/>
|
---|
| 360 | <compilerarg value="-Xlint:empty"/>
|
---|
| 361 | <compilerarg value="-Xlint:finally"/>
|
---|
| 362 | <compilerarg value="-Xlint:overrides"/>
|
---|
| 363 | <!--<compilerarg value="-Xlint:rawtypes"/>-->
|
---|
| 364 | <compilerarg value="-Xlint:static"/>
|
---|
| 365 | <compilerarg value="-Xlint:try"/>
|
---|
| 366 | <compilerarg value="-Xlint:unchecked"/>
|
---|
| 367 | <!-- Undocumented argument to ignore "Sun internal proprietary API" warning, see http://stackoverflow.com/a/13862308/2257172 -->
|
---|
| 368 | <compilerarg value="-XDignore.symbol.file"/>
|
---|
[10704] | 369 | <compilerarg value="-Xep:ReferenceEquality:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
|
---|
[11494] | 370 | <compilerarg value="-Xep:ImmutableEnumChecker:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
|
---|
[11675] | 371 | <compilerarg value="-Xep:FutureReturnValueIgnored:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
|
---|
| 372 | <compilerarg value="-Xep:FloatingPointLiteralPrecision:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
|
---|
| 373 | <compilerarg value="-Xep:ShortCircuitBoolean:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
|
---|
[13304] | 374 | <compilerarg value="-Xep:StringSplitter:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
|
---|
[13073] | 375 | <compilerarg value="-Xep:JdkObsolete:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
|
---|
[10659] | 376 | <compilerarg line="-Xmaxwarns 1000"/>
|
---|
[13819] | 377 | <exclude name="org/openstreetmap/josm/io/audio/fx/*.java" if:set="noJavaFX"/>
|
---|
[8526] | 378 | </javac>
|
---|
| 379 |
|
---|
[6756] | 380 | <copy todir="build" failonerror="no" includeemptydirs="no">
|
---|
| 381 | <fileset dir="resources"/>
|
---|
| 382 | </copy>
|
---|
[4166] | 383 | </target>
|
---|
[9765] | 384 | <target name="init" depends="init-properties">
|
---|
[5392] | 385 | <uptodate property="javacc.notRequired" targetfile="${mapcss.dir}/parsergen/MapCSSParser.java" >
|
---|
| 386 | <srcfiles dir="${mapcss.dir}" includes="MapCSSParser.jj"/>
|
---|
| 387 | </uptodate>
|
---|
[9765] | 388 | <mkdir dir="${build.dir}"/>
|
---|
| 389 | <mkdir dir="${dist.dir}"/>
|
---|
[4166] | 390 | </target>
|
---|
[9765] | 391 | <target name="javadoc" depends="init-properties">
|
---|
| 392 | <javadoc destdir="javadoc"
|
---|
[7133] | 393 | sourcepath="${src.dir}"
|
---|
[9765] | 394 | encoding="UTF-8"
|
---|
[5263] | 395 | packagenames="org.openstreetmap.josm.*,org.openstreetmap.gui.jmapviewer.*"
|
---|
[9250] | 396 | excludepackagenames="org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.*"
|
---|
[5263] | 397 | windowtitle="JOSM"
|
---|
| 398 | use="true"
|
---|
[5481] | 399 | private="true"
|
---|
[5263] | 400 | linksource="true"
|
---|
| 401 | author="false">
|
---|
[10580] | 402 | <link href="http://docs.oracle.com/javase/8/docs/api"/>
|
---|
[5263] | 403 | <doctitle><![CDATA[<h2>JOSM - Javadoc</h2>]]></doctitle>
|
---|
[6955] | 404 | <bottom><![CDATA[<a href="https://josm.openstreetmap.de/">JOSM</a>]]></bottom>
|
---|
[13494] | 405 | <arg value="-html5" if:set="isJava9" />
|
---|
[11596] | 406 | <arg value="--add-exports" if:set="isJava9" />
|
---|
| 407 | <arg value="java.base/sun.security.util=ALL-UNNAMED" if:set="isJava9" />
|
---|
| 408 | <arg value="--add-exports" if:set="isJava9" />
|
---|
| 409 | <arg value="java.base/sun.security.x509=ALL-UNNAMED" if:set="isJava9" />
|
---|
[13820] | 410 | <arg value="--add-exports" if:set="isJava9" unless:set="noJavaFX" />
|
---|
| 411 | <arg value="javafx.graphics/com.sun.javafx.application=ALL-UNNAMED" if:set="isJava9" unless:set="noJavaFX" />
|
---|
[13819] | 412 | <excludepackage name="org/openstreetmap/josm/io/audio/fx" if:set="noJavaFX" />
|
---|
[5263] | 413 | </javadoc>
|
---|
| 414 | </target>
|
---|
[9765] | 415 | <target name="clean" depends="init-properties">
|
---|
| 416 | <delete dir="${build.dir}"/>
|
---|
| 417 | <delete dir="${proj-build.dir}"/>
|
---|
[12582] | 418 | <delete dir="${checkstyle-build.dir}"/>
|
---|
[9765] | 419 | <delete dir="${dist.dir}"/>
|
---|
[4252] | 420 | <delete dir="${mapcss.dir}/parsergen"/>
|
---|
[8535] | 421 | <delete file="${src.dir}/org/w3/_2001/xmlschema/Adapter1.java"/>
|
---|
| 422 | <delete dir="${src.dir}/org/openstreetmap/josm/data/imagery/types"/>
|
---|
[9133] | 423 | <delete file="${epsg.output}"/>
|
---|
[13209] | 424 | <delete file="${pmd.dir}/cache"/>
|
---|
[4166] | 425 | </target>
|
---|
[7068] | 426 | <macrodef name="init-test-preferences">
|
---|
| 427 | <attribute name="testfamily"/>
|
---|
| 428 | <sequential>
|
---|
| 429 | <copy file="${test.dir}/config/preferences.template.xml" tofile="${test.dir}/config/@{testfamily}-josm.home/preferences.xml"/>
|
---|
| 430 | <replace file="${test.dir}/config/@{testfamily}-josm.home/preferences.xml" encoding="UTF-8" token="@OSM_USERNAME@" value="${osm.username}"/>
|
---|
| 431 | <replace file="${test.dir}/config/@{testfamily}-josm.home/preferences.xml" encoding="UTF-8" token="@OSM_PASSWORD@" value="${osm.password}"/>
|
---|
| 432 | </sequential>
|
---|
| 433 | </macrodef>
|
---|
[9765] | 434 | <target name="test-init" depends="init-properties">
|
---|
[6121] | 435 | <mkdir dir="${test.dir}/build"/>
|
---|
[7068] | 436 | <mkdir dir="${test.dir}/build/unit"/>
|
---|
| 437 | <mkdir dir="${test.dir}/build/functional"/>
|
---|
| 438 | <mkdir dir="${test.dir}/build/performance"/>
|
---|
[4166] | 439 | <mkdir dir="${test.dir}/report"/>
|
---|
[7068] | 440 | <init-test-preferences testfamily="unit"/>
|
---|
| 441 | <init-test-preferences testfamily="functional"/>
|
---|
| 442 | <init-test-preferences testfamily="performance"/>
|
---|
[13209] | 443 | <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpath="${tools.dir}/jacocoant.jar" />
|
---|
[4166] | 444 | </target>
|
---|
[9765] | 445 | <target name="test-clean" depends="init-properties">
|
---|
[6121] | 446 | <delete dir="${test.dir}/build"/>
|
---|
[4166] | 447 | <delete dir="${test.dir}/report"/>
|
---|
[6133] | 448 | <delete file="${test.dir}/jacoco.exec" />
|
---|
[9501] | 449 | <delete file="${test.dir}/jacocoIT.exec" />
|
---|
[10850] | 450 | <delete file="${test.dir}/config/unit-josm.home" failonerror="false"/>
|
---|
| 451 | <delete file="${test.dir}/config/functional-josm.home" failonerror="false"/>
|
---|
| 452 | <delete file="${test.dir}/config/performance-josm.home" failonerror="false"/>
|
---|
[4166] | 453 | </target>
|
---|
[7068] | 454 | <macrodef name="call-groovyc">
|
---|
| 455 | <attribute name="testfamily"/>
|
---|
| 456 | <element name="cp-elements"/>
|
---|
| 457 | <sequential>
|
---|
| 458 | <groovyc srcdir="${test.dir}/@{testfamily}" destdir="${test.dir}/build/@{testfamily}" encoding="UTF-8">
|
---|
| 459 | <classpath>
|
---|
| 460 | <cp-elements/>
|
---|
| 461 | </classpath>
|
---|
[12628] | 462 | <javac target="${java.lang.version}" source="${java.lang.version}" debug="on" encoding="UTF-8">
|
---|
[7068] | 463 | <compilerarg value="-Xlint:all"/>
|
---|
| 464 | <compilerarg value="-Xlint:-serial"/>
|
---|
| 465 | </javac>
|
---|
| 466 | </groovyc>
|
---|
| 467 | </sequential>
|
---|
| 468 | </macrodef>
|
---|
[4166] | 469 | <target name="test-compile" depends="test-init,dist">
|
---|
[8687] | 470 | <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpath="${groovy.jar}"/>
|
---|
[7068] | 471 | <call-groovyc testfamily="unit">
|
---|
| 472 | <cp-elements>
|
---|
| 473 | <path refid="test.classpath"/>
|
---|
| 474 | </cp-elements>
|
---|
| 475 | </call-groovyc>
|
---|
| 476 | <call-groovyc testfamily="functional">
|
---|
| 477 | <cp-elements>
|
---|
| 478 | <path refid="test.classpath"/>
|
---|
| 479 | <pathelement path="${test.dir}/build/unit"/>
|
---|
| 480 | </cp-elements>
|
---|
| 481 | </call-groovyc>
|
---|
| 482 | <call-groovyc testfamily="performance">
|
---|
| 483 | <cp-elements>
|
---|
| 484 | <path refid="test.classpath"/>
|
---|
| 485 | <pathelement path="${test.dir}/build/unit"/>
|
---|
| 486 | </cp-elements>
|
---|
| 487 | </call-groovyc>
|
---|
[4166] | 488 | </target>
|
---|
[7068] | 489 | <macrodef name="call-junit">
|
---|
| 490 | <attribute name="testfamily"/>
|
---|
[9501] | 491 | <attribute name="testITsuffix" default=""/>
|
---|
[13523] | 492 | <attribute name="coverage" default="${coverageByDefault}"/>
|
---|
[7068] | 493 | <sequential>
|
---|
[9501] | 494 | <echo message="Running @{testfamily}@{testITsuffix} tests with JUnit"/>
|
---|
[13103] | 495 | <jacoco:coverage destfile="${test.dir}/jacoco@{testITsuffix}.exec" enabled="@{coverage}" includes="${jacoco.includes}"
|
---|
| 496 | inclbootstrapclasses="${jacoco.inclbootstrapclasses}" inclnolocationclasses="${jacoco.inclnolocationclasses}">
|
---|
[7068] | 497 | <junit printsummary="yes" fork="true" forkmode="once">
|
---|
[7367] | 498 | <jvmarg value="-Dfile.encoding=UTF-8"/>
|
---|
[13505] | 499 | <jvmarg value="--add-modules" if:set="isJava9" unless:set="isJava11" />
|
---|
| 500 | <jvmarg value="java.activation,java.se.ee" if:set="isJava9" unless:set="isJava11" />
|
---|
[11006] | 501 | <jvmarg value="--add-exports" if:set="isJava9" />
|
---|
| 502 | <jvmarg value="java.base/sun.security.util=ALL-UNNAMED" if:set="isJava9" />
|
---|
[12459] | 503 | <jvmarg value="--add-exports" if:set="isJava9" />
|
---|
[11006] | 504 | <jvmarg value="java.base/sun.security.x509=ALL-UNNAMED" if:set="isJava9" />
|
---|
[13820] | 505 | <jvmarg value="--add-exports" if:set="isJava9" unless:set="noJavaFX" />
|
---|
| 506 | <jvmarg value="javafx.graphics/com.sun.javafx.application=ALL-UNNAMED" if:set="isJava9" unless:set="noJavaFX" />
|
---|
| 507 | <jvmarg value="--add-exports" if:set="isJava9" unless:set="isJava11" />
|
---|
| 508 | <jvmarg value="jdk.deploy/com.sun.deploy.config=ALL-UNNAMED" if:set="isJava9" unless:set="isJava11" />
|
---|
[12228] | 509 | <jvmarg value="--add-opens" if:set="isJava9" />
|
---|
[12230] | 510 | <jvmarg value="java.base/java.io=ALL-UNNAMED" if:set="isJava9" />
|
---|
| 511 | <jvmarg value="--add-opens" if:set="isJava9" />
|
---|
[12228] | 512 | <jvmarg value="java.base/java.lang=ALL-UNNAMED" if:set="isJava9" />
|
---|
[12230] | 513 | <jvmarg value="--add-opens" if:set="isJava9" />
|
---|
[12932] | 514 | <jvmarg value="java.base/java.nio=ALL-UNNAMED" if:set="isJava9" />
|
---|
| 515 | <jvmarg value="--add-opens" if:set="isJava9" />
|
---|
[12230] | 516 | <jvmarg value="java.base/java.text=ALL-UNNAMED" if:set="isJava9" />
|
---|
| 517 | <jvmarg value="--add-opens" if:set="isJava9" />
|
---|
| 518 | <jvmarg value="java.base/java.util=ALL-UNNAMED" if:set="isJava9" />
|
---|
| 519 | <jvmarg value="--add-opens" if:set="isJava9" />
|
---|
| 520 | <jvmarg value="java.desktop/java.awt=ALL-UNNAMED" if:set="isJava9" />
|
---|
[7068] | 521 | <sysproperty key="josm.home" value="${test.dir}/config/@{testfamily}-josm.home"/>
|
---|
| 522 | <sysproperty key="josm.test.data" value="${test.dir}/data"/>
|
---|
| 523 | <sysproperty key="java.awt.headless" value="true"/>
|
---|
[10529] | 524 | <sysproperty key="glass.platform" value="Monocle"/>
|
---|
| 525 | <sysproperty key="monocle.platform" value="Headless"/>
|
---|
| 526 | <sysproperty key="prism.order" value="sw"/>
|
---|
[7068] | 527 | <sysproperty key="suppressPermanentFailure" value="${suppressPermanentFailure}"/>
|
---|
| 528 | <classpath>
|
---|
| 529 | <path refid="test.classpath"/>
|
---|
| 530 | <pathelement path="${test.dir}/build/unit"/>
|
---|
| 531 | <pathelement path="${test.dir}/build/@{testfamily}"/>
|
---|
| 532 | <pathelement path="${test.dir}/config"/>
|
---|
| 533 | </classpath>
|
---|
| 534 | <formatter type="plain"/>
|
---|
| 535 | <formatter type="xml"/>
|
---|
| 536 | <batchtest fork="yes" todir="${test.dir}/report">
|
---|
[9501] | 537 | <fileset dir="${test.dir}/build/@{testfamily}" includes="**/*Test@{testITsuffix}.class"/>
|
---|
[7068] | 538 | </batchtest>
|
---|
| 539 | </junit>
|
---|
| 540 | </jacoco:coverage>
|
---|
| 541 | </sequential>
|
---|
| 542 | </macrodef>
|
---|
[9501] | 543 | <target name="test" depends="test-compile" unless="test.notRequired"
|
---|
[12534] | 544 | description="Run unit and functional tests. OSM API (TEST) account shall be set with -Dosm.username and -Dosm.password">
|
---|
[7068] | 545 | <call-junit testfamily="unit"/>
|
---|
| 546 | <call-junit testfamily="functional"/>
|
---|
[4166] | 547 | </target>
|
---|
[9501] | 548 | <target name="test-it" depends="test-compile" unless="test-it.notRequired"
|
---|
| 549 | description="Run integration tests. OSM API (TEST) account shall be set with -Dosm.username and -Dosm.password">
|
---|
| 550 | <call-junit testfamily="unit" testITsuffix="IT"/>
|
---|
| 551 | <call-junit testfamily="functional" testITsuffix="IT"/>
|
---|
| 552 | </target>
|
---|
[12534] | 553 | <target name="test-perf" depends="test-compile" unless="test-perf.notRequired"
|
---|
| 554 | description="Run performance tests. OSM API (TEST) account shall be set with -Dosm.username and -Dosm.password">
|
---|
| 555 | <call-junit testfamily="performance" coverage="false"/>
|
---|
| 556 | </target>
|
---|
| 557 | <target name="test-html" depends="test, test-it, test-perf" description="Generate HTML test reports">
|
---|
[4166] | 558 | <!-- May require additional ant dependencies like ant-trax package -->
|
---|
| 559 | <junitreport todir="${test.dir}/report">
|
---|
| 560 | <fileset dir="${test.dir}/report">
|
---|
| 561 | <include name="TEST-*.xml"/>
|
---|
| 562 | </fileset>
|
---|
| 563 | <report todir="${test.dir}/report/html"/>
|
---|
| 564 | </junitreport>
|
---|
[6133] | 565 | <jacoco:report>
|
---|
| 566 | <executiondata>
|
---|
[11963] | 567 | <fileset dir="${test.dir}" includes="*.exec"/>
|
---|
[6133] | 568 | </executiondata>
|
---|
| 569 | <structure name="JOSM Test Coverage">
|
---|
| 570 | <classfiles>
|
---|
| 571 | <fileset dir="${build.dir}" includes="org/openstreetmap/"/>
|
---|
| 572 | </classfiles>
|
---|
| 573 | <sourcefiles encoding="UTF-8">
|
---|
| 574 | <fileset dir="${src.dir}" includes="org/openstreetmap/"/>
|
---|
| 575 | </sourcefiles>
|
---|
| 576 | </structure>
|
---|
[6134] | 577 | <html destdir="${test.dir}/report/jacoco"/>
|
---|
[6133] | 578 | </jacoco:report>
|
---|
[4166] | 579 | </target>
|
---|
[13073] | 580 | <target name="dist-optimized" depends="dist">
|
---|
[13209] | 581 | <taskdef resource="proguard/ant/task.properties" classpath="${tools.dir}/proguard.jar"/>
|
---|
[4166] | 582 | <proguard>
|
---|
[12628] | 583 | -injars ${dist.jar}
|
---|
| 584 | -outjars ${dist-optimized.jar}
|
---|
[4166] | 585 |
|
---|
[13073] | 586 | -libraryjars ${java.home}/lib
|
---|
[4166] | 587 |
|
---|
[7367] | 588 | -dontoptimize
|
---|
| 589 | -dontobfuscate
|
---|
[4166] | 590 |
|
---|
[7367] | 591 | # These options probably are not necessary (and make processing a bit slower)
|
---|
| 592 | -dontskipnonpubliclibraryclasses
|
---|
| 593 | -dontskipnonpubliclibraryclassmembers
|
---|
[4166] | 594 |
|
---|
[7367] | 595 | -keepclasseswithmembers public class org.openstreetmap.josm.gui.MainApplication {
|
---|
| 596 | public static void main(java.lang.String[]);
|
---|
| 597 | }
|
---|
[4166] | 598 |
|
---|
[7367] | 599 | -keep class * extends org.openstreetmap.josm.io.FileImporter
|
---|
| 600 | -keep class * extends org.openstreetmap.josm.io.FileExporter
|
---|
| 601 | -keep class org.openstreetmap.josm.actions.search.SearchCompiler$Never
|
---|
[10949] | 602 | -keep class org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory$PseudoClasses {
|
---|
[8532] | 603 | static boolean *(org.openstreetmap.josm.gui.mappaint.Environment);
|
---|
| 604 | }
|
---|
[8172] | 605 | -keep class org.apache.commons.logging.impl.*
|
---|
[4166] | 606 |
|
---|
[7367] | 607 | -keepclassmembers enum * {
|
---|
| 608 | public static **[] values();
|
---|
| 609 | public static ** valueOf(java.lang.String);
|
---|
| 610 | }
|
---|
[4166] | 611 |
|
---|
[12873] | 612 | # Keep unused public classes and methods (needed for plugins)
|
---|
| 613 | -keep public class * {
|
---|
[7367] | 614 | public protected *;
|
---|
| 615 | }
|
---|
[4838] | 616 |
|
---|
[12873] | 617 | # Keep serialization code
|
---|
[10949] | 618 | -keepclassmembers class * implements java.io.Serializable {
|
---|
[12873] | 619 | static final long serialVersionUID;
|
---|
| 620 | private static final java.io.ObjectStreamField[] serialPersistentFields;
|
---|
[10949] | 621 | private void writeObject(java.io.ObjectOutputStream);
|
---|
| 622 | private void readObject(java.io.ObjectInputStream);
|
---|
[12873] | 623 | java.lang.Object writeReplace();
|
---|
| 624 | java.lang.Object readResolve();
|
---|
[10949] | 625 | }
|
---|
| 626 |
|
---|
[7367] | 627 | # Disable annoying [proguard] Note: the configuration keeps the entry point '...', but not the descriptor class '...'.
|
---|
| 628 | # This note should not be a problem as we don't use obfuscation
|
---|
| 629 | -dontnote
|
---|
[6133] | 630 | </proguard>
|
---|
[4166] | 631 | </target>
|
---|
[10845] | 632 | <!-- Proguard does not support Java 9 : http://sourceforge.net/p/proguard/bugs/551/ -->
|
---|
| 633 | <target name="dist-optimized-report" depends="dist-optimized" unless="isJava9">
|
---|
| 634 | <!-- generate difference report between optimized jar and normal one -->
|
---|
| 635 | <exec executable="perl" dir="${basedir}">
|
---|
[13209] | 636 | <arg value="${tools.dir}/japicc/japi-compliance-checker.pl"/>
|
---|
[10845] | 637 | <arg value="--lib=JOSM"/>
|
---|
| 638 | <arg value="--keep-internal"/>
|
---|
| 639 | <arg value="--v1=${version.entry.commit.revision}"/>
|
---|
| 640 | <arg value="--v2=${version.entry.commit.revision}-optimized"/>
|
---|
| 641 | <arg value="--report-path=${dist.dir}/compat_report.html"/>
|
---|
[12628] | 642 | <arg value="${dist.jar}"/>
|
---|
| 643 | <arg value="${dist-optimized.jar}"/>
|
---|
[10845] | 644 | </exec>
|
---|
| 645 | </target>
|
---|
[12873] | 646 | <target name="check-plugins" depends="dist-optimized" description="Check of plugins binary compatibility">
|
---|
[4166] | 647 | <local name="dir"/>
|
---|
| 648 | <local name="plugins"/>
|
---|
| 649 | <property name="dir" value="plugin-check"/>
|
---|
| 650 | <typedef uri="antlib:org.codehaus.mojo.animal_sniffer">
|
---|
[13209] | 651 | <classpath path="${tools.dir}/animal-sniffer-ant-tasks.jar"/>
|
---|
[4166] | 652 | </typedef>
|
---|
[13574] | 653 | <delete dir="${dir}" failonerror="false"/>
|
---|
[4166] | 654 | <mkdir dir="${dir}"/>
|
---|
| 655 | <!-- List of deprecated plugins -->
|
---|
[7133] | 656 | <loadfile property="deprecated-plugins" srcFile="${src.dir}/org/openstreetmap/josm/plugins/PluginHandler.java">
|
---|
[4166] | 657 | <filterchain>
|
---|
| 658 | <linecontains>
|
---|
| 659 | <contains value="new DeprecatedPlugin("/>
|
---|
| 660 | </linecontains>
|
---|
| 661 | <tokenfilter>
|
---|
| 662 | <replaceregex pattern=".*new DeprecatedPlugin\("(.+?)".*" replace="\1|" flags="gi"/>
|
---|
| 663 | </tokenfilter>
|
---|
| 664 | <striplinebreaks/>
|
---|
| 665 | <tokenfilter>
|
---|
| 666 | <replaceregex pattern="\|$" replace="" flags="gi"/>
|
---|
| 667 | </tokenfilter>
|
---|
| 668 | </filterchain>
|
---|
| 669 | </loadfile>
|
---|
[5498] | 670 | <!-- Download list of plugins -->
|
---|
[4166] | 671 | <loadresource property="plugins">
|
---|
[6955] | 672 | <url url="https://josm.openstreetmap.de/plugin"/>
|
---|
[4166] | 673 | <filterchain>
|
---|
| 674 | <linecontainsregexp negate="true">
|
---|
| 675 | <regexp pattern="^\t.*"/>
|
---|
| 676 | </linecontainsregexp>
|
---|
| 677 | <linecontainsregexp negate="true">
|
---|
| 678 | <regexp pattern="${deprecated-plugins}"/>
|
---|
| 679 | </linecontainsregexp>
|
---|
| 680 | <tokenfilter>
|
---|
| 681 | <replaceregex pattern="^.*;" replace="" flags="gi"/>
|
---|
| 682 | </tokenfilter>
|
---|
| 683 | </filterchain>
|
---|
[6133] | 684 | </loadresource>
|
---|
| 685 | <!-- Delete files that are not in plugin list (like old plugins) -->
|
---|
| 686 | <loadresource property="file-list">
|
---|
| 687 | <propertyresource name="plugins"/>
|
---|
| 688 | <filterchain>
|
---|
| 689 | <tokenfilter>
|
---|
| 690 | <replaceregex pattern="^.*/(.*)$" replace="\1\|" flags=""/>
|
---|
| 691 | </tokenfilter>
|
---|
| 692 | <striplinebreaks/>
|
---|
| 693 | <tokenfilter>
|
---|
| 694 | <replaceregex pattern="\|$" replace="" flags="gi"/>
|
---|
[9765] | 695 | </tokenfilter>
|
---|
[6133] | 696 | </filterchain>
|
---|
| 697 | </loadresource>
|
---|
| 698 | <delete>
|
---|
| 699 | <restrict>
|
---|
| 700 | <fileset dir="${dir}"/>
|
---|
| 701 | <not>
|
---|
| 702 | <name regex="${file-list}"/>
|
---|
| 703 | </not>
|
---|
| 704 | </restrict>
|
---|
| 705 | </delete>
|
---|
| 706 | <!-- Download plugins -->
|
---|
[12874] | 707 | <copy todir="${dir}" flatten="true" verbose="true" failonerror="false">
|
---|
[4166] | 708 | <resourcelist>
|
---|
| 709 | <string value="${plugins}"/>
|
---|
| 710 | </resourcelist>
|
---|
| 711 | </copy>
|
---|
| 712 | <!-- Check plugins -->
|
---|
[5498] | 713 | <as:build-signatures destfile="${dir}/api.sig">
|
---|
| 714 | <path>
|
---|
[12628] | 715 | <fileset file="${dist-optimized.jar}"/>
|
---|
[5498] | 716 | <fileset file="${java.home}/lib/rt.jar"/>
|
---|
| 717 | <fileset file="${java.home}/lib/jce.jar"/>
|
---|
[12873] | 718 | <fileset file="${java.home}/lib/ext/jfxrt.jar"/>
|
---|
[5498] | 719 | </path>
|
---|
[6133] | 720 | </as:build-signatures>
|
---|
[12873] | 721 | <as:check-signature signature="${dir}/api.sig" failonerror="false">
|
---|
[13711] | 722 | <ignore classname="afu.*"/>
|
---|
[12873] | 723 | <ignore classname="au.*"/>
|
---|
[7367] | 724 | <ignore classname="com.*"/>
|
---|
[12873] | 725 | <ignore classname="de.*"/>
|
---|
| 726 | <ignore classname="edu.*"/>
|
---|
| 727 | <ignore classname="groovy.*"/>
|
---|
| 728 | <ignore classname="it.*"/>
|
---|
[7367] | 729 | <ignore classname="javax.*"/>
|
---|
| 730 | <ignore classname="jogamp.*"/>
|
---|
| 731 | <ignore classname="junit.*"/>
|
---|
[12873] | 732 | <ignore classname="kdu_jni.*"/>
|
---|
| 733 | <ignore classname="net.*"/>
|
---|
| 734 | <ignore classname="netscape.*"/>
|
---|
| 735 | <ignore classname="nu.*"/>
|
---|
| 736 | <ignore classname="oracle.*"/>
|
---|
[7367] | 737 | <ignore classname="org.apache.*"/>
|
---|
[12873] | 738 | <ignore classname="org.bouncycastle.*"/>
|
---|
[13711] | 739 | <ignore classname="org.checkerframework.*"/>
|
---|
[7367] | 740 | <ignore classname="org.codehaus.*"/>
|
---|
| 741 | <ignore classname="org.dom4j.*"/>
|
---|
[12873] | 742 | <ignore classname="org.eclipse.*"/>
|
---|
| 743 | <ignore classname="org.ejml.*"/>
|
---|
| 744 | <ignore classname="org.gdal.*"/>
|
---|
| 745 | <ignore classname="org.hibernate.*"/>
|
---|
[7367] | 746 | <ignore classname="org.hsqldb.*"/>
|
---|
| 747 | <ignore classname="org.ibex.*"/>
|
---|
[7934] | 748 | <ignore classname="org.iso_relax.*"/>
|
---|
[7367] | 749 | <ignore classname="org.jaitools.*"/>
|
---|
| 750 | <ignore classname="org.jaxen.*"/>
|
---|
[12873] | 751 | <ignore classname="org.jboss.*"/>
|
---|
[13575] | 752 | <ignore classname="org.jdom.*"/>
|
---|
[7367] | 753 | <ignore classname="org.jdom2.*"/>
|
---|
[12873] | 754 | <ignore classname="org.jfree.*"/>
|
---|
[4166] | 755 | <ignore classname="org.jgraph.*"/>
|
---|
[12873] | 756 | <ignore classname="org.joda.*"/>
|
---|
| 757 | <ignore classname="org.junit.*"/>
|
---|
| 758 | <ignore classname="org.jvnet.*"/>
|
---|
[7367] | 759 | <ignore classname="org.kxml2.*"/>
|
---|
[8090] | 760 | <ignore classname="org.objectweb.*"/>
|
---|
[12873] | 761 | <ignore classname="org.osgi.*"/>
|
---|
| 762 | <ignore classname="org.postgresql.*"/>
|
---|
[7367] | 763 | <ignore classname="org.python.*"/>
|
---|
[12875] | 764 | <ignore classname="org.seasar.*"/>
|
---|
[7367] | 765 | <ignore classname="org.slf4j.*"/>
|
---|
[12873] | 766 | <ignore classname="org.springframework.*"/>
|
---|
| 767 | <ignore classname="org.testng.*"/>
|
---|
[13113] | 768 | <ignore classname="org.w3c.*"/>
|
---|
[12873] | 769 | <ignore classname="org.zeromq.*"/>
|
---|
[8173] | 770 | <!-- plugins used by another ones -->
|
---|
[7494] | 771 | <ignore classname="org.openstreetmap.josm.plugins.geotools.*"/>
|
---|
[7934] | 772 | <ignore classname="org.openstreetmap.josm.plugins.jna.*"/>
|
---|
[7494] | 773 | <ignore classname="org.openstreetmap.josm.plugins.jts.*"/>
|
---|
| 774 | <ignore classname="org.openstreetmap.josm.plugins.log4j.*"/>
|
---|
| 775 | <ignore classname="org.openstreetmap.josm.plugins.utilsplugin2.*"/>
|
---|
[12875] | 776 | <ignore classname="sun.*"/>
|
---|
[4166] | 777 | <path path="${dir}"/>
|
---|
| 778 | </as:check-signature>
|
---|
| 779 | </target>
|
---|
[4838] | 780 |
|
---|
[8687] | 781 | <macrodef name="_taginfo">
|
---|
| 782 | <attribute name="type"/>
|
---|
| 783 | <attribute name="output"/>
|
---|
| 784 | <sequential>
|
---|
| 785 | <echo message="Generating Taginfo for type @{type} to @{output}"/>
|
---|
[13209] | 786 | <groovy src="${taginfoextract}" classpath="${dist.jar}:${spotbugs.dir}/spotbugs-annotations.jar">
|
---|
[8687] | 787 | <arg value="-t"/>
|
---|
| 788 | <arg value="@{type}"/>
|
---|
| 789 | <arg value="--noexit"/>
|
---|
| 790 | <arg value="--svnweb"/>
|
---|
| 791 | <arg value="--imgurlprefix"/>
|
---|
| 792 | <arg value="${imgurlprefix}"/>
|
---|
| 793 | <arg value="-o"/>
|
---|
| 794 | <arg value="@{output}"/>
|
---|
| 795 | </groovy>
|
---|
| 796 | </sequential>
|
---|
| 797 | </macrodef>
|
---|
| 798 |
|
---|
| 799 | <target name="taginfo" depends="dist">
|
---|
[13209] | 800 | <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="${groovy.jar};${tools.dir}/commons-cli-1.3.1.jar"/>
|
---|
[9880] | 801 | <property name="taginfoextract" value="scripts/TagInfoExtract.groovy"/>
|
---|
[8687] | 802 | <property name="imgurlprefix" value="http://josm.openstreetmap.de/download/taginfo/taginfo-img"/>
|
---|
[9250] | 803 | <_taginfo type="mappaint" output="taginfo_style.json"/>
|
---|
| 804 | <_taginfo type="presets" output="taginfo_presets.json"/>
|
---|
| 805 | <_taginfo type="external_presets" output="taginfo_external_presets.json"/>
|
---|
[8687] | 806 | </target>
|
---|
| 807 |
|
---|
[9765] | 808 | <target name="imageryindex" depends="init-properties">
|
---|
[13209] | 809 | <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="${groovy.jar};${tools.dir}/commons-cli-1.3.1.jar"/>
|
---|
[9505] | 810 | <echo message="Checking editor imagery difference"/>
|
---|
[12628] | 811 | <groovy src="scripts/SyncEditorLayerIndex.groovy" classpath="${dist.jar}">
|
---|
[11965] | 812 | <arg value="-noeli"/>
|
---|
[11964] | 813 | <arg value="-p"/>
|
---|
[11965] | 814 | <arg value="imagery_eliout.imagery.xml"/>
|
---|
[11964] | 815 | <arg value="-q"/>
|
---|
[11965] | 816 | <arg value="imagery_josmout.imagery.xml"/>
|
---|
[9505] | 817 | </groovy>
|
---|
| 818 | </target>
|
---|
| 819 |
|
---|
| 820 | <target name="imageryindexdownload">
|
---|
| 821 | <exec append="false" executable="wget" failifexecutionfails="true">
|
---|
| 822 | <arg value="https://josm.openstreetmap.de/maps"/>
|
---|
| 823 | <arg value="-O"/>
|
---|
[11965] | 824 | <arg value="imagery_josm.imagery.xml"/>
|
---|
[9505] | 825 | <arg value="--unlink"/>
|
---|
| 826 | </exec>
|
---|
| 827 | <exec append="false" executable="wget" failifexecutionfails="true">
|
---|
[11238] | 828 | <arg value="https://josm.openstreetmap.de/wiki/ImageryCompareIgnores?format=txt"/>
|
---|
| 829 | <arg value="-O"/>
|
---|
[11965] | 830 | <arg value="imagery_josm.ignores.txt"/>
|
---|
[11238] | 831 | <arg value="--unlink"/>
|
---|
| 832 | </exec>
|
---|
| 833 | <exec append="false" executable="wget" failifexecutionfails="true">
|
---|
[11857] | 834 | <arg value="https://raw.githubusercontent.com/osmlab/editor-layer-index/gh-pages/imagery.geojson"/>
|
---|
[9505] | 835 | <arg value="-O"/>
|
---|
[11965] | 836 | <arg value="imagery_eli.geojson"/>
|
---|
[9505] | 837 | <arg value="--unlink"/>
|
---|
| 838 | </exec>
|
---|
| 839 | <antcall target="imageryindex"/>
|
---|
| 840 | </target>
|
---|
| 841 |
|
---|
[12582] | 842 | <target name="checkstyle-compile" depends="init-properties">
|
---|
| 843 | <mkdir dir="${checkstyle-build.dir}"/>
|
---|
[13209] | 844 | <javac sourcepath="" srcdir="${checkstyle.dir}/src" failonerror="true"
|
---|
[12628] | 845 | destdir="${checkstyle-build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on"
|
---|
[12582] | 846 | includeantruntime="false" createMissingPackageInfoClass="false"
|
---|
[13209] | 847 | encoding="UTF-8" classpath="${checkstyle.dir}/checkstyle-all.jar">
|
---|
[12582] | 848 | </javac>
|
---|
| 849 | </target>
|
---|
[13303] | 850 | <target name="checkstyle-changed" depends="checkstyle-compile">
|
---|
| 851 | <exec append="false" osfamily="unix" executable="bash" failifexecutionfails="true">
|
---|
| 852 | <arg value="-c"/>
|
---|
| 853 | <arg value="svn status -q --ignore-externals src test | grep -o '\(src\|test\)/.*' | xargs java -cp '${checkstyle.dir}/checkstyle-all.jar:${checkstyle-build.dir}' com.puppycrawl.tools.checkstyle.Main -c ${checkstyle.dir}/josm_checks.xml | sed -e 's:\([^ ]*\) [^:]*/\([^:/]*.java\:[^:]*\):(\2)\1:'"/>
|
---|
| 854 | </exec>
|
---|
| 855 | <exec append="false" osfamily="windows" executable="powershell" failifexecutionfails="true">
|
---|
| 856 | <arg value="/c"/>
|
---|
| 857 | <arg value="svn status -q --ignore-externals src test | ForEach-Object {java -cp '${checkstyle.dir}/checkstyle-all.jar;${checkstyle-build.dir}' com.puppycrawl.tools.checkstyle.Main -c ${checkstyle.dir}/josm_checks.xml $_.split(' ')[7]}"/>
|
---|
| 858 | </exec>
|
---|
| 859 | </target>
|
---|
[12582] | 860 | <target name="checkstyle" depends="checkstyle-compile">
|
---|
[9765] | 861 | <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
|
---|
[13209] | 862 | classpath="${checkstyle.dir}/checkstyle-all.jar:${checkstyle-build.dir}"/>
|
---|
| 863 | <checkstyle config="${checkstyle.dir}/josm_checks.xml">
|
---|
[9765] | 864 | <fileset dir="${base.dir}/src/org/openstreetmap/josm" includes="**/*.java"
|
---|
[9250] | 865 | excludes="gui/mappaint/mapcss/parsergen/*.java"/>
|
---|
[9765] | 866 | <fileset dir="${base.dir}/test" includes="**/*.java"/>
|
---|
[11681] | 867 | <formatter type="plain"/>
|
---|
[8508] | 868 | <formatter type="xml" toFile="checkstyle-josm.xml"/>
|
---|
| 869 | </checkstyle>
|
---|
| 870 | </target>
|
---|
| 871 |
|
---|
[12801] | 872 | <target name="spotbugs" depends="dist">
|
---|
[13209] | 873 | <taskdef name="spotbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${spotbugs.dir}/spotbugs-ant.jar"/>
|
---|
[12801] | 874 | <path id="spotbugs-classpath">
|
---|
[13209] | 875 | <fileset dir="${spotbugs.dir}">
|
---|
[4838] | 876 | <include name="*.jar"/>
|
---|
| 877 | </fileset>
|
---|
| 878 | </path>
|
---|
[12801] | 879 | <property name="spotbugs-classpath" refid="spotbugs-classpath"/>
|
---|
| 880 | <spotbugs output="xml"
|
---|
| 881 | outputFile="spotbugs-josm.xml"
|
---|
| 882 | classpath="${spotbugs-classpath}"
|
---|
[6133] | 883 | pluginList=""
|
---|
[13209] | 884 | excludeFilter="${spotbugs.dir}/josm-filter.xml"
|
---|
[6133] | 885 | effort="max"
|
---|
[10223] | 886 | reportLevel="low"
|
---|
[6133] | 887 | >
|
---|
[9765] | 888 | <sourcePath path="${base.dir}/src" />
|
---|
[12628] | 889 | <class location="${dist.jar}" />
|
---|
[12801] | 890 | </spotbugs>
|
---|
[4838] | 891 | </target>
|
---|
[11713] | 892 |
|
---|
| 893 | <target name="pmd" depends="init-properties">
|
---|
| 894 | <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpath="${toString:pmd.classpath}"/>
|
---|
[13209] | 895 | <pmd shortFilenames="true" cacheLocation="${pmd.dir}/cache" encoding="UTF-8">
|
---|
[12628] | 896 | <sourceLanguage name="java" version="${java.lang.version}" />
|
---|
[13209] | 897 | <ruleset>${pmd.dir}/josm-ruleset.xml</ruleset>
|
---|
[11713] | 898 | <formatter type="text" toConsole="true" />
|
---|
| 899 | <formatter type="xml" toFile="pmd-josm.xml">
|
---|
| 900 | <param name="encoding" value="UTF-8" />
|
---|
| 901 | </formatter>
|
---|
| 902 | <fileset dir="${src.dir}">
|
---|
| 903 | <include name="org/openstreetmap/josm/**/*.java"/>
|
---|
| 904 | <exclude name="org/openstreetmap/josm/gui/mappaint/mapcss/parsergen/*.java" />
|
---|
| 905 | </fileset>
|
---|
| 906 | </pmd>
|
---|
| 907 | </target>
|
---|
| 908 |
|
---|
[5323] | 909 | <target name="run" depends="dist">
|
---|
[12628] | 910 | <java jar="${dist.jar}" fork="true">
|
---|
[5323] | 911 | <arg value="--set=expert=true"/>
|
---|
| 912 | <arg value="--set=remotecontrol.enabled=true"/>
|
---|
| 913 | <arg value="--set=debug.edt-checker.enable=false"/>
|
---|
| 914 | <jvmarg value="-Djosm.home=/tmp/.josm/"/>
|
---|
| 915 | </java>
|
---|
| 916 | </target>
|
---|
[9765] | 917 | <!--
|
---|
| 918 | ** Compile build script for generating projection list.
|
---|
| 919 | -->
|
---|
[10850] | 920 | <target name="epsg-compile" depends="init-properties">
|
---|
[9765] | 921 | <property name="proj-classpath" location="${build.dir}"/>
|
---|
| 922 | <mkdir dir="${proj-build.dir}"/>
|
---|
[13794] | 923 | <javac sourcepath="" srcdir="${base.dir}/scripts" failonerror="true" includes="BuildProjectionDefinitions.java"
|
---|
[12628] | 924 | destdir="${proj-build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on"
|
---|
[9765] | 925 | includeantruntime="false" createMissingPackageInfoClass="false"
|
---|
| 926 | encoding="UTF-8" classpath="${proj-classpath}">
|
---|
[9133] | 927 | </javac>
|
---|
| 928 | </target>
|
---|
[9765] | 929 | <!--
|
---|
| 930 | ** generate projection list.
|
---|
| 931 | -->
|
---|
[9133] | 932 | <target name="epsg" depends="epsg-compile">
|
---|
[13236] | 933 | <touch file="${epsg.output}" mkdirs="true"/>
|
---|
[10259] | 934 | <java classname="BuildProjectionDefinitions" failonerror="true" fork="true">
|
---|
[9735] | 935 | <sysproperty key="java.awt.headless" value="true"/>
|
---|
[9133] | 936 | <classpath>
|
---|
[9765] | 937 | <pathelement path="${base.dir}"/>
|
---|
| 938 | <pathelement path="${proj-classpath}"/>
|
---|
| 939 | <pathelement path="${proj-build.dir}"/>
|
---|
[9133] | 940 | </classpath>
|
---|
[9765] | 941 | <arg value="${base.dir}"/>
|
---|
[9133] | 942 | </java>
|
---|
| 943 | </target>
|
---|
[4166] | 944 | </project>
|
---|