Changeset 7209 in josm for trunk/build.xml


Ignore:
Timestamp:
2014-06-02T20:24:59+02:00 (5 years ago)
Author:
Don-vip
Message:

see #10040 - call JDK xjc native executable instead of ant task to avoid problems with JDK8 and OpenSUSE systems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r7208 r7209  
    2222        <isset property="clevel"/>
    2323    </condition>
     24    <!-- For Windows-specific stuff -->
     25    <condition property="isWindows">
     26        <os family="Windows"/>
     27    </condition>
    2428    <!-- Java classpath addition (all jar files to compile tests with this) -->
    2529    <path id="classpath">
     
    9599      ** Check internal XML files against their XSD
    96100    -->
    97     <target name="check-schemas">
     101    <target name="check-schemas" unless="check-schemas.notRequired">
    98102        <schemavalidate file="data/defaultpresets.xml" >
    99103            <schema namespace="http://josm.openstreetmap.de/tagging-preset-1.0" file="data/tagging-preset.xsd" />
     
    199203        </exec>
    200204    </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>
     205    <target name="-jaxb_win" if="isWindows">
     206        <property name="xjc" value="${java.home}\..\bin\xjc.exe" />
     207    </target>
     208    <target name="-jaxb_nix" unless="isWindows">
     209        <property name="xjc" value="${java.home}/../bin/xjc" />
     210    </target>
     211    <target name="jaxb" depends="init, -jaxb_win, -jaxb_nix" unless="jaxb.notRequired">
     212        <exec executable="${xjc}" failonerror="true">
     213            <arg value="-d"/>
     214            <arg value="${src.dir}"/>
     215            <arg value="-encoding"/>
     216            <arg value="UTF-8"/>
     217            <arg value="data_nodist/wms-cache.xsd"/>
     218        </exec>
    211219    </target>
    212220    <target name="compile" depends="init,javacc,jaxb">
Note: See TracChangeset for help on using the changeset viewer.