Index: applications/editors/josm/plugins/validator/build.xml
===================================================================
--- applications/editors/josm/plugins/validator/build.xml	(revision 5147)
+++ applications/editors/josm/plugins/validator/build.xml	(revision 5153)
@@ -1,3 +1,12 @@
-<project name="validator" default="build" basedir=".">
+<project name="validator" default="dist" basedir=".">
+
+  <!-- compilation properties -->
+  <property name="josm.build.dir"	value="../../core"/>
+  <property name="josm.home.dir"	value="${user.home}/.josm"/>
+  <property name="josm"			location="../../core/dist/josm-custom.jar" />
+  <property name="plugin.build.dir"	value="build"/>
+  <property name="plugin.dist.dir"	value="../dist"/>
+  <property name="plugin.name"		value="${ant.project.name}"/>
+  <property name="plugin.jar"		value="../dist/${plugin.name}.jar"/>
 
   <!-- point to your JOSM directory -->
@@ -7,5 +16,5 @@
   
   <target name="init">
-    <mkdir dir="build"/>
+    <mkdir dir="${plugin.build.dir}"/>
   </target>
 
@@ -16,5 +25,5 @@
   </target>
 
-  <target name="build" depends="clean, compile">
+  <target name="dist" depends="clean, compile">
     <copy todir="build/images">
       <fileset dir="images"/>
@@ -28,5 +37,5 @@
     <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     <delete file="REVISION"/>
-    <jar destfile="validator.jar" basedir="build">
+    <jar destfile="${plugin.jar}" basedir="build">
       <manifest>
 	<attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.validator.OSMValidatorPlugin"/>
@@ -39,10 +48,12 @@
   </target>
 
+  <!-- clean target -->
   <target name="clean">
-    <delete dir="build" />
+    <delete dir="${plugin.build.dir}" />
+    <delete file="${plugin.jar}" />
   </target>
 
-  <target name="install" depends="build">
-    <copy file="validator.jar" todir="${user.home}/.josm/plugins"/>
+  <target name="install" depends="dist">
+    <copy file="${plugin.jar}" todir="${user.home}/.josm/plugins"/>
   </target>
 
@@ -51,3 +62,4 @@
     </java>
   </target>
+
 </project>
