diff --git a/build/aant.config b/build/aant.config
index 71b878e..f806250 100644
--- a/build/aant.config
+++ b/build/aant.config
@@ -1,5 +1,4 @@
 [config]
-project_name: ant
 config_dir: ../../build/aant
 bug_pattern: (?:^|[^0-9])([1-9][0-9]{2,4})(?:$|[^0-9])
 bug_parser: bug_parsers.Bugzilla
@@ -7,3 +6,4 @@ tracker: https://issues.apache.org/bugzilla/show_bug.cgi?id=%%s
 file_patterns: src/.*\.java
 TestRunner.skip: 4e0bc26a7f62acc66a775963f28e425cc6ea2be9
 EventLogProcessor.max_events: 250
+some_new_config: 5
diff --git a/build/build.gant b/build/build.gant
index b2233a2..c3dfc06 100644
--- a/build/build.gant
+++ b/build/build.gant
@@ -5,11 +5,14 @@
  * Copyright Steven Davies 2012
  */
 
+includeTool << gant.tools.Ivy
+
 property(name: 'root', value:'..')
 property(file: "${root}/build/build.properties")
 
 java_dir = "${root}/java/"
 java_src_dir = "${java_dir}/src/"
+java_test_dir = "${java_dir}/test/"
 java_build_dir = "${java_dir}/build/"
 python_dir = "${root}/python/src"
 perl_dir = "${root}/perl/src"
@@ -17,10 +20,10 @@ report_dir = "${root}/latex/paper/src"
 property(name:'sweave_cache_dir', location:"${root}/latex/paper/src/cache")
 
 path(id: 'classpath'){
+    fileset(dir: "${root}/lib"){
+        include(name:"*.jar")
+    }
     fileset(dir: java_lib_dir){
-        include(name:'**/commons-io-2.2.jar')
-        include(name:'**/commons-lang*.jar')
-        include(name:'**/guava-*.jar')
         include(name:'**/org.eclipse.core.contenttype*.jar')
         include(name:'**/org.eclipse.core.jobs*.jar')
         include(name:'**/org.eclipse.core.resources*.jar')
@@ -30,9 +33,9 @@ path(id: 'classpath'){
         include(name:'**/org.eclipse.jdt.core*.jar')
         include(name:'**/org.eclipse.osgi*.jar')
         include(name:'**/org.eclipse.text*.jar')
-        include(name:'**/weka*.jar')
     }
 }
+ant.property(name:"classpath", refid:"classpath")
 
 path(id: 'run_classpath'){
     path(refid: 'classpath')
@@ -46,13 +49,7 @@ path(id: 'taskspath'){
         include(name:'**/ant_latex_*.jar')
     }
 }
-
-path(id: 'emmapath'){
-    path(refid: 'classpath')
-    fileset(dir: java_lib_dir){
-        include(name:'**/emma*.jar')
-    }
-}
+ant.property(name:"taskspath", refid:"taskspath")
 
 path(id: 'pythonpath'){
     dirset(dir: python_lib_dir){
@@ -65,7 +62,7 @@ path(id: 'pythonpath'){
 }
 ant.property(name:"pythonpath", refid:"pythonpath")
 
-def debug = {
+def debug_project = {
     project.each { k, v ->
         println(k + ': ' + v)
     }
@@ -153,6 +150,14 @@ def process_from = {
     }
 }
 
+target(debug:'Prints debugging information'){
+    echoproperties()
+}
+
+target(get_jars:'Downloads dependencies'){
+    ivy.retrieve(pattern:"${root}/lib/[artifact]-[revision].[ext]", type:'jar')
+}
+
 target(compile:'Compiles Java classes'){
     mkdir(dir:java_build_dir)
     javac(srcdir:java_src_dir, destdir: java_build_dir, classpathref:'classpath', debug:true) {
@@ -160,6 +165,23 @@ target(compile:'Compiles Java classes'){
     }
 }
 
+target(test:'Tests Java classes'){
+    depends(compile)
+    javac(srcdir:java_test_dir, destdir: java_build_dir, classpathref:'classpath', debug:true) {
+        include(name: '**/*.java')
+    }
+    junit(){
+        classpath(refid:'classpath')
+        formatter(type:'plain', tofile:false)
+        formatter(type:'xml')
+        batchtest(todir:"${root}/reports"){
+            fileset(dir:java_test_dir){
+                include(name: '**/*.java')
+            }
+        }
+    }
+}
+
 target(uncache: 'Cleans Sweave cache whenever new reports are generated'){
     delete(dir:sweave_cache_dir)
     mkdir(dir:sweave_cache_dir)
@@ -196,7 +218,7 @@ target(report:'Generates final report from evaluation files'){
 }
 
 def targets = [
-    [ name: 'debug', description: 'Prints info for', depends: debug ],
+    [ name: 'debug', description: 'Prints info for', depends: debug_project ],
     [ name: 'clean', description: 'Cleans ', depends: clean, exclude: true ],
     [ name: 'find_fixes', description: 'Get list of bug-fixing commits for ', depends: find_fixes ],
     [ name: 'download_bugs', description: 'Downloads bug details for ', depends: download_bugs ],
