Index: /trunk/.classpath
===================================================================
--- /trunk/.classpath	(revision 7132)
+++ /trunk/.classpath	(revision 7133)
@@ -22,4 +22,9 @@
 	<classpathentry kind="lib" path="test/lib/unitils-core/unitils-core-3.3.jar"/>
 	<classpathentry kind="lib" path="test/lib/fest/debug-1.0.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jaxb">
+		<attributes>
+			<attribute name="owner.project.facets" value="jpt.jaxb"/>
+		</attributes>
+	</classpathentry>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Index: /trunk/.project
===================================================================
--- /trunk/.project	(revision 7132)
+++ /trunk/.project	(revision 7133)
@@ -6,4 +6,9 @@
 	</projects>
 	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 		<buildCommand>
 			<name>sf.eclipse.javacc.javaccbuilder</name>
@@ -31,4 +36,5 @@
 		<nature>org.eclipse.jdt.core.javanature</nature>
 		<nature>sf.eclipse.javacc.javaccnature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
 	</natures>
 </projectDescription>
Index: /trunk/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
===================================================================
--- /trunk/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml	(revision 7133)
+++ /trunk/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml	(revision 7133)
@@ -0,0 +1,15 @@
+<root>
+  <facet id="jpt.jaxb">
+    <node name="libprov">
+      <attribute name="provider-id" value="jaxb-user-library-provider"/>
+    </node>
+    <node name="platform">
+      <attribute name="platform-id" value="generic_2_2"/>
+    </node>
+    <node name="schemas">
+      <node name="schema-1">
+        <attribute name="location" value="platform:/resource/JOSM/data_nodist/wms-cache.xsd"/>
+      </node>
+    </node>
+  </facet>
+</root>
Index: /trunk/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- /trunk/.settings/org.eclipse.wst.common.project.facet.core.xml	(revision 7133)
+++ /trunk/.settings/org.eclipse.wst.common.project.facet.core.xml	(revision 7133)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <installed facet="java" version="1.7"/>
+  <installed facet="jpt.jaxb" version="2.2"/>
+</faceted-project>
Index: /trunk/build.xml
===================================================================
--- /trunk/build.xml	(revision 7132)
+++ /trunk/build.xml	(revision 7133)
@@ -5,5 +5,5 @@
 **    ant clean
 **    ant dist
-** This will create 'josm-custom.jar'  in directory 'dist'. See also
+** This will create 'josm-custom.jar' in directory 'dist'. See also
 **   https://josm.openstreetmap.de/wiki/CreateBuild
 **
@@ -15,4 +15,5 @@
     <property name="javacc.home" location="tools"/>
     <property name="mapcss.dir" location="${src.dir}/org/openstreetmap/josm/gui/mappaint/mapcss"/>
+    <property name="imagerytypes.dir" location="${src.dir}/org/openstreetmap/josm/data/imagery/types"/>
     <!-- build parameter: compression level (ant -Dclevel=N)
              N ranges from 0 (no compression) to 9 (maximum compression)
@@ -125,5 +126,5 @@
             <zipfileset dir="data" prefix="data"/>
             <zipfileset dir="styles" prefix="styles"/>
-            <zipfileset dir="src/org/openstreetmap/gui/jmapviewer/images" prefix="org/openstreetmap/gui/jmapviewer/images"/>
+            <zipfileset dir="${src.dir}/org/openstreetmap/gui/jmapviewer/images" prefix="org/openstreetmap/gui/jmapviewer/images"/>
             <!-- All jar files necessary to run only JOSM (no tests) -->
             <!-- <zipfileset src="lib/metadata-extractor-2.3.1-nosun.jar"/>  -->
@@ -198,7 +199,18 @@
         </exec>
     </target>
-    <target name="compile" depends="init,javacc">
+    <target name="jaxb" depends="init" unless="jaxb.notRequired">
+        <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
+            <classpath>
+                <fileset dir="tools/jaxb" includes="*.jar"/>
+            </classpath>
+        </taskdef>
+        <xjc schema="data_nodist/wms-cache.xsd" destdir="${src.dir}" encoding="UTF-8">
+            <depends dir="${src.dir}/org/openstreetmap/josm/data/imagery" includes="WmsCache.java"/>
+            <produces dir="${imagerytypes.dir}" includes="*.java"/>
+        </xjc>
+    </target>
+    <target name="compile" depends="init,javacc,jaxb">
         <!-- COTS -->
-        <javac srcdir="src" includes="com/**,oauth/**,org/apache/commons/codec/**,org/glassfish/**" nowarn="on"
+        <javac srcdir="${src.dir}" includes="com/**,oauth/**,org/apache/commons/codec/**,org/glassfish/**" nowarn="on"
             destdir="build" target="1.7" source="1.7" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="iso-8859-1">
             <!-- get rid of "internal proprietary API" warning -->
@@ -206,5 +218,5 @@
         </javac>
         <!-- JMapViewer/JOSM -->
-        <javac srcdir="src" excludes="com/**,oauth/**,org/apache/commons/codec/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/Demo.java" 
+        <javac srcdir="${src.dir}" excludes="com/**,oauth/**,org/apache/commons/codec/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/Demo.java" 
             destdir="build" target="1.7" source="1.7" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
             <compilerarg value="-Xlint:cast"/>
@@ -233,5 +245,5 @@
     <target name="javadoc">
         <javadoc destdir="javadoc" 
-                sourcepath="src"
+                sourcepath="${src.dir}"
                 encoding="UTF-8"    
                 packagenames="org.openstreetmap.josm.*,org.openstreetmap.gui.jmapviewer.*"
@@ -250,4 +262,5 @@
         <delete dir="dist"/>
         <delete dir="${mapcss.dir}/parsergen"/>
+        <delete dir="${imagerytypes.dir}"/>
     </target>
     <path id="test.classpath">
@@ -351,5 +364,5 @@
     </macrodef>
     <target name="test" depends="test-compile" 
-    	description="Run unit, functional and performance tests. OSM API (TEST) account shall be set with -Dosm.username and -Dosm.password">
+        description="Run unit, functional and performance tests. OSM API (TEST) account shall be set with -Dosm.username and -Dosm.password">
         <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpath="tools/jacocoant.jar" />
         <call-junit testfamily="unit"/>
@@ -431,5 +444,5 @@
         <mkdir dir="${dir}"/>
         <!-- List of deprecated plugins -->
-        <loadfile property="deprecated-plugins" srcFile="src/org/openstreetmap/josm/plugins/PluginHandler.java">
+        <loadfile property="deprecated-plugins" srcFile="${src.dir}/org/openstreetmap/josm/plugins/PluginHandler.java">
             <filterchain>
                 <linecontains>
