Index: trunk/build.xml
===================================================================
--- trunk/build.xml	(revision 15032)
+++ trunk/build.xml	(revision 15033)
@@ -38,5 +38,5 @@
         <property name="mapcss.dir" location="${src.dir}/org/openstreetmap/josm/gui/mappaint/mapcss"/>
         <property name="proj-build.dir" location="${base.dir}/build2"/>
-        <property name="taginfo-build.dir" location="${base.dir}/build2"/>
+        <property name="script-build.dir" location="${base.dir}/build2"/>
         <property name="checkstyle-build.dir" location="${base.dir}/build2"/>
         <property name="epsg.output" location="${base.dir}/data/projection/custom-epsg"/>
@@ -47,4 +47,5 @@
         <property name="failureaccess.jar" location="${tools.dir}/failureaccess.jar"/>
         <property name="guava.jar" location="${tools.dir}/guava.jar"/>
+    	<property name="commons-lang3.jar" location="${pmd.dir}/commons-lang3-3.8.1.jar"/>
         <property name="jformatstring.jar" location="${spotbugs.dir}/jFormatString-3.0.0.jar"/>
         <property name="dist.jar" location="${dist.dir}/josm-custom.jar"/>
@@ -79,9 +80,4 @@
             <isset property="isJava9"/>
         </condition>
-        <path id="groovy.classpath">
-            <fileset dir="${tools.dir}/groovy">
-                <include name="*.jar"/>
-            </fileset>
-        </path>
         <path id="test.classpath">
             <fileset dir="${test.dir}/lib">
@@ -91,5 +87,5 @@
             <pathelement path="${failureaccess.jar}"/>
             <pathelement path="${guava.jar}"/>
-            <pathelement path="${pmd.dir}/commons-lang3-3.8.1.jar"/>
+            <pathelement path="${commons-lang3.jar}"/>
             <pathelement path="${spotbugs.dir}/spotbugs-annotations.jar"/>
         </path>
@@ -430,4 +426,5 @@
         <delete dir="${build.dir}"/>
         <delete dir="${proj-build.dir}"/>
+        <delete dir="${script-build.dir}"/>
         <delete dir="${checkstyle-build.dir}"/>
         <delete dir="${dist.dir}"/>
@@ -842,9 +839,14 @@
     </target>
 
-    <target name="taginfo-compile" depends="dist">
-        <javac sourcepath="" srcdir="${base.dir}/scripts" failonerror="true" includes="TagInfoExtract.java"
-               destdir="${taginfo-build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on"
-               includeantruntime="false" createMissingPackageInfoClass="false"
-               encoding="UTF-8" classpath="${build.dir}">
+    <target name="script-compile" depends="dist, test-compile">
+        <javac sourcepath="" srcdir="${base.dir}/scripts" failonerror="true" includes="*.java"
+               destdir="${script-build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on"
+               includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8">
+            <classpath>
+                <pathelement path="${build.dir}"/>
+                <pathelement path="${test.dir}/build/unit"/>
+                <pathelement path="${guava.jar}"/>
+                <pathelement path="${commons-lang3.jar}"/>
+            </classpath>
         </javac>
     </target>
@@ -859,5 +861,7 @@
                 <classpath>
                     <pathelement path="${dist.jar}"/>
-                    <pathelement path="${taginfo-build.dir}"/>
+                    <pathelement path="${script-build.dir}"/>
+                    <pathelement path="${guava.jar}"/>
+                    <pathelement path="${commons-lang3.jar}"/>
                 </classpath>
                 <arg value="--type"/>
@@ -872,5 +876,5 @@
     </macrodef>
 
-    <target name="taginfo" depends="taginfo-compile">
+    <target name="taginfo" depends="script-compile">
         <_taginfo type="mappaint" output="taginfo_style.json"/>
         <_taginfo type="presets" output="taginfo_presets.json"/>
@@ -878,14 +882,19 @@
     </target>
 
-    <target name="imageryindex" depends="init-properties">
-        <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpathref="groovy.classpath"/>
+    <target name="imageryindex" depends="init-properties,script-compile">
         <echo message="Checking editor imagery difference"/>
-        <groovy src="scripts/SyncEditorLayerIndex.groovy" classpath="${dist.jar}">
-                <arg value="-noeli"/>
-                <arg value="-p"/>
-                <arg value="imagery_eliout.imagery.xml"/>
-                <arg value="-q"/>
-                <arg value="imagery_josmout.imagery.xml"/>
-        </groovy>
+        <java classname="SyncEditorLayerIndex" failonerror="true" fork="false">
+            <classpath>
+                <pathelement path="${dist.jar}"/>
+                <pathelement path="${script-build.dir}"/>
+                <pathelement path="${guava.jar}"/>
+                <pathelement path="${commons-lang3.jar}"/>
+            </classpath>
+            <arg value="--noeli"/>
+            <arg value="-p"/>
+            <arg value="imagery_eliout.imagery.xml"/>
+            <arg value="-q"/>
+            <arg value="imagery_josmout.imagery.xml"/>
+        </java>
     </target>
 
