Index: /applications/editors/josm/plugins/build-common.xml
===================================================================
--- /applications/editors/josm/plugins/build-common.xml	(revision 30746)
+++ /applications/editors/josm/plugins/build-common.xml	(revision 30747)
@@ -37,4 +37,7 @@
     </target>
 
+    <!-- To be overriden in plugin build file before inclusion if other plugins are required -->
+    <fileset id="plugin.requires.jars" dir="${plugin.dist.dir}" includes="nothing"/>
+
     <!--
     **********************************************************
@@ -60,4 +63,5 @@
                     <include name="**/*.jar"/>
                 </fileset>
+                <fileset refid="plugin.requires.jars"/>
             </classpath>
         </javac>
@@ -380,7 +384,4 @@
         <pathelement path="${groovy.jar}"/>
     </path>
-    <condition property="plugin.requires.jars.set">
-        <isreference refid="plugin.requires.jars"/>
-    </condition>
     <macrodef name="init-test-preferences">
         <sequential>
@@ -403,10 +404,10 @@
         <delete dir="${plugin.test.dir}/config/unit-josm.home/cache" failonerror="false"/>
     </target>
-    <macrodef name="call-groovyc">
-        <element name="cp-elements"/>
+    <target name="test-compile" depends="test-init,dist">
+        <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpath="${groovy.jar}"/>
         <sequential>
             <groovyc srcdir="${plugin.test.dir}/unit" destdir="${plugin.test.dir}/build/unit" encoding="UTF-8">
                 <classpath>
-                    <cp-elements/>
+                    <fileset refid="plugin.requires.jars"/>
                     <path refid="test.classpath"/>
                 </classpath>
@@ -417,24 +418,8 @@
             </groovyc>
         </sequential>
-    </macrodef>
-    <target name="call-groovyc-extended" if="plugin.requires.jars.set">
-        <call-groovyc>
-            <cp-elements>
-                <fileset refid="plugin.requires.jars"/>
-            </cp-elements>
-        </call-groovyc>
-    </target>
-    <target name="call-groovyc-base" unless="plugin.requires.jars.set">
-        <call-groovyc>
-            <cp-elements/>
-        </call-groovyc>
-    </target>
-    <target name="test-compile" depends="test-init,dist">
-        <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpath="${groovy.jar}"/>
-        <antcall target="call-groovyc-base"/>
-        <antcall target="call-groovyc-extended"/>
-    </target>
-    <macrodef name="call-junit">
-        <element name="cp-elements"/>
+    </target>
+    <target name="test" depends="dist, test-compile" 
+        description="Run unit 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="../00_core_tools/jacocoant.jar" />
         <sequential>
             <echo message="Running unit tests with JUnit"/>
@@ -447,5 +432,5 @@
                     <sysproperty key="suppressPermanentFailure" value="${suppressPermanentFailure}"/>
                     <classpath>
-                        <cp-elements/>
+                        <fileset refid="plugin.requires.jars"/>
                         <path refid="test.classpath"/>
                         <pathelement path="${plugin.test.dir}/build/unit"/>
@@ -459,22 +444,4 @@
             </jacoco:coverage>
         </sequential>
-    </macrodef>
-    <target name="call-junit-extended" if="plugin.requires.jars.set">
-        <call-junit>
-            <cp-elements>
-                <fileset refid="plugin.requires.jars"/>
-            </cp-elements>
-        </call-junit>
-    </target>
-    <target name="call-junit-base" unless="plugin.requires.jars.set">
-        <call-junit>
-            <cp-elements/>
-        </call-junit>
-    </target>
-    <target name="test" depends="dist, test-compile" 
-        description="Run unit 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="../00_core_tools/jacocoant.jar" />
-        <antcall target="call-junit-base"/>
-        <antcall target="call-junit-extended"/>
     </target>
 	
