Force maven to install in java jobs using scripts

The *version2* java jobs execute scripts that need ${MVN} to actually
operate properly. As these scripts are happening before the standard
maven build step maven is not installed yet. Ergo, we need an empty
maven build step that makes sure that it's installed.

Change-Id: I5a0979fdffa87f695b1bc575e24b04097889ea59
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml
index 2d2d6c3..46c4d82 100644
--- a/jjb/global-macros.yaml
+++ b/jjb/global-macros.yaml
@@ -20,6 +20,15 @@
             - file-id: '{settings-file}'
               variable: 'SETTINGS_FILE'
 
+# call maven-target builder with a goal of --version to force Jenkins to
+# install the needed maven version
+- builder:
+    name: maven-install
+    builders:
+      - maven-target:
+          maven-version: '{maven-version}'
+          goals: '--version'
+
 - builder:
     name: maven-docker-push-release
     builders: