Index: trunk/build.xml
===================================================================
--- trunk/build.xml	(revision 16877)
+++ trunk/build.xml	(revision 16878)
@@ -31,5 +31,5 @@
         <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${ivy.jar.file}"/>
     </target>
-    <target name="init-properties" depends="resolve">
+    <target name="init-properties">
         <property environment="env"/>
         <!-- Load properties in a target and not at top level, so this build file can be
@@ -38,4 +38,5 @@
         of the importing ant file. Use ${base.dir} instead, which is always the parent
         directory of this file. -->
+        <dirname property="base.dir" file="${ant.file.josm}"/>
         <property name="test.dir" location="${base.dir}/test"/>
         <property name="src.dir" location="${base.dir}/src"/>
@@ -183,5 +184,5 @@
     </target>
     <!-- Mac OS X target -->
-    <target name="mac" depends="init-properties">
+    <target name="mac" depends="init">
         <!-- Using https://bitbucket.org/infinitekind/appbundler to create mac application bundle -->
         <taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${tools.dir}/appbundler.jar"/>
@@ -310,5 +311,5 @@
         </copy>
     </target>
-    <target name="init" depends="init-properties">
+    <target name="init" depends="init-properties,resolve">
         <uptodate property="javacc.notRequired" targetfile="${mapcss.dir}/parsergen/MapCSSParser.java" >
             <srcfiles dir="${mapcss.dir}" includes="MapCSSParser.jj"/>
@@ -321,5 +322,5 @@
         <mkdir dir="${dist.dir}"/>
     </target>
-    <target name="javadoc" depends="init-properties">
+    <target name="javadoc" depends="init">
         <javadoc destdir="javadoc"
                 sourcepath="${src.dir}"
@@ -828,5 +829,5 @@
     </target>
 
-    <target name="imageryindex" depends="init-properties,script-compile">
+    <target name="imageryindex" depends="script-compile">
         <echo message="Checking editor imagery difference"/>
         <java classname="SyncEditorLayerIndex" failonerror="true" fork="false">
@@ -866,5 +867,5 @@
     </target>
 
-    <target name="checkstyle-compile" depends="init-properties">
+    <target name="checkstyle-compile" depends="init">
         <ivy:cachepath log="download-only" file="${tools.ivy}" pathid="checkstyle.classpath" conf="checkstyle"/>
         <mkdir dir="${checkstyle-build.dir}"/>
@@ -916,5 +917,5 @@
     </target>
 
-    <target name="pmd" depends="init-properties">
+    <target name="pmd" depends="init">
         <ivy:cachepath log="download-only" file="${tools.ivy}" pathid="pmd.classpath" conf="pmd"/>
         <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.classpath"/>
@@ -944,5 +945,5 @@
       ** Compile build script for generating projection list.
     -->
-    <target name="epsg-compile" depends="init-properties">
+    <target name="epsg-compile" depends="init">
         <property name="proj-classpath" location="${build.dir}"/>
         <mkdir dir="${proj-build.dir}"/>
