diff --git a/srcpkgs/apache-ant/INSTALL.msg b/srcpkgs/apache-ant/INSTALL.msg
index d28a8b21b6f..eeec13d9f78 100644
--- a/srcpkgs/apache-ant/INSTALL.msg
+++ b/srcpkgs/apache-ant/INSTALL.msg
@@ -1,8 +1,4 @@
-=====================================================================
-
 - Please re-login to include Apache Ant in your PATH or re-source
   /etc/profile:
 
 	$ source /etc/profile
-
-=====================================================================
diff --git a/srcpkgs/apache-ant/template b/srcpkgs/apache-ant/template
index 24fab20be2d..7a98c6c17f6 100644
--- a/srcpkgs/apache-ant/template
+++ b/srcpkgs/apache-ant/template
@@ -1,7 +1,7 @@
 # Template file for 'apache-ant'
 pkgname="apache-ant"
 version="1.9.4"
-revision=4
+revision=5
 short_desc="Java library and command-line tool that help building software"
 maintainer="Enno Boland <eb@s01.de>"
 license="Apache License"
@@ -13,16 +13,16 @@ depends="virtual?java-runtime"
 noarch="yes"
 _prefix=usr/share/apache-ant
 
-export JAVA_HOME=/usr/lib/jvm/openjdk
-
 do_configure() {
 	# Disable tests
 	sed -i 's/jars,test-jar/jars/' build.xml
 }
 do_build() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk
 	./build.sh -Ddist.dir=$DESTDIR/$_prefix jars
 }
 do_install() {
+	export JAVA_HOME=/usr/lib/jvm/openjdk
 	./build.sh -Ddist.dir=$DESTDIR/$_prefix dist
 
 	vinstall ${FILESDIR}/apache-ant.sh 644 etc/profile.d