Install Saxon jar to local maven repository

So far, every time a sonar analysis was done, the Saxon library was
downloaded and stored to a temporal folder. That was inconvenient when
trying to run analysis and no internet connection was available.

Use maven-dependency-plugin:copy so that Saxon jar is cached in local
maven repository and available even when off line.

Change-Id: Ib2bd39c3275814fe95e2626b37b572206b85f870
diff --git a/tools/buck_to_junit.py b/tools/buck_to_junit.py
index f40a4ff..026c015 100755
--- a/tools/buck_to_junit.py
+++ b/tools/buck_to_junit.py
@@ -28,13 +28,14 @@
 try:
   try:
     check_call(
-      ['curl', '--proxy-anyauth', '-sfo', path.join(temp_dir, 'saxon.jar'),
-       'http://central.maven.org/maven2/net/sf/saxon/Saxon-HE/9.6.0-6/Saxon-HE-9.6.0-6.jar'])
+      ['mvn', 'org.apache.maven.plugins:maven-dependency-plugin:copy',
+       '-Dmdep.stripVersion=true', '-Dartifact=net.sf.saxon:Saxon-HE:9.6.0-6',
+       '-DoutputDirectory=' + temp_dir])
   except OSError as err:
-    print('could not invoke curl: %s\nis curl installed?' % err)
+    print('could not invoke mvn: %s\nis mvn installed?' % err)
     exit(1)
   except CalledProcessError as err:
-    print('error using curl: %s' % err)
+    print('error using mvn: %s' % err)
     exit(1)
 
   buck_report = abspath(args.t)
@@ -44,7 +45,7 @@
   chdir(args.o)
   try:
     check_call(
-      ['java', '-jar', path.join(temp_dir, 'saxon.jar'), '-s:' + buck_report,
+      ['java', '-jar', path.join(temp_dir, 'Saxon-HE.jar'), '-s:' + buck_report,
        '-xsl:' + buck_to_junit_xsl])
   except CalledProcessError as err:
     print('error converting to junit: %s' % err)