Index: /trunk/build.xml
===================================================================
--- /trunk/build.xml	(revision 16164)
+++ /trunk/build.xml	(revision 16165)
@@ -59,5 +59,5 @@
         <property name="javacutil.jar" location="${tools.dir}/javacutil.jar"/>
         <property name="failureaccess.jar" location="${tools.dir}/failureaccess.jar"/>
-        <property name="commons-lang3.jar" location="${pmd.dir}/commons-lang3-3.8.1.jar"/>
+        <property name="commons-lang3.jar" location="${tools.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"/>
@@ -103,9 +103,4 @@
             <pathelement path="${commons-lang3.jar}"/>
             <pathelement path="${spotbugs.dir}/spotbugs-annotations.jar"/>
-        </path>
-        <path id="pmd.classpath">
-            <fileset dir="${pmd.dir}">
-                <include name="*.jar"/>
-            </fileset>
         </path>
         <path id="processor.path">
@@ -974,4 +969,5 @@
 
     <target name="pmd" depends="init-properties">
+        <ivy:cachepath pathid="pmd.classpath" conf="pmd"/>
         <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpath="${toString:pmd.classpath}"/>
         <pmd shortFilenames="true" cacheLocation="${pmd.dir}/cache" encoding="UTF-8">
Index: /trunk/ivy.xml
===================================================================
--- /trunk/ivy.xml	(revision 16164)
+++ /trunk/ivy.xml	(revision 16165)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- License: GPL. For details, see LICENSE file. -->
-<ivy-module version="2.0">
+<ivy-module version="2.0" xmlns:maven="http://ant.apache.org/ivy/maven">
     <info organisation="org.openstreetmap" module="josm"/>
     <configurations>
@@ -10,4 +10,5 @@
         <conf name="runtimeOnly" description="The libs shipped with JOSM that we do not need during compilation"/>
         <conf name="provided" description="The libs we need during compilation but not on application start"/>
+        <conf name="pmd" description="Everything needed for running PMD"/>
         <conf name="epsg" description="Everything epsg needs- which is currently all of JOSM."/>
         <!--  Meta configuration used in build scripts -->
@@ -26,4 +27,11 @@
         <dependency org="com.drewnoakes" name="metadata-extractor" rev="2.13.0" conf="api->default"/>
         <dependency org="ch.poole" name="OpeningHoursParser" rev="0.21.1" conf="api->default"/>
+        <!-- pmd->default -->
+        <dependency org="net.sourceforge.pmd" name="pmd-core" rev="6.20.0" conf="pmd->default"/>
+        <dependency org="net.sourceforge.pmd" name="pmd-java" rev="6.20.0" conf="pmd->default"/>
+        <dependency org="net.sourceforge.saxon" name="saxon" rev="9.1.0.8" conf="pmd->default">
+            <artifact name="saxon" type="jar"/>
+            <artifact name="saxon" type="jar" maven:classifier="dom"/>
+        </dependency>
         <!-- sources->sources -->
         <dependency org="javax.json" name="javax.json-api" rev="1.1.4" conf="sources->sources"/>
