diff --git a/.travis/codacy-install.sh b/.travis/codacy-install.sh
index 92e4cc3c667f40fb7d201b4c55936c615c2fe947..32345de384a2a35760e488dd43b903fc88d6a31e 100755
--- a/.travis/codacy-install.sh
+++ b/.travis/codacy-install.sh
@@ -1,5 +1,7 @@
 #!/usr/bin/env bash
-latest="4.0.1"
+# get latest version of codacy reporter from sonatype
+latest=$(curl "https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/maven-metadata.xml" | xpath -e "/metadata/versioning/release/text()")
+
 echo Downloading latest version $latest of codacy reporter from sonatype
 # download laterst assembly jar
 mvn dependency:get dependency:copy \