Refactor java verify jobs

Change-Id: Iecf1891cfa85d056f62fc8b842a901da1de0dee1
Issue-ID: CIMAN-187
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
diff --git a/jjb/global-templates-java.yaml b/jjb/global-templates-java.yaml
index ad7fe53..03653d8 100644
--- a/jjb/global-templates-java.yaml
+++ b/jjb/global-templates-java.yaml
@@ -3,70 +3,6 @@
     # Job template for Java verify jobs
     #
     # The purpose of this job template is to run:
-    # 1. maven clean install -DskipTests=true
-    #
-    # Required Variables:
-    #     branch:    git branch (eg. stable/lithium or master)
-
-    name: '{project-name}-{stream}-verify-java-skip-tests'
-
-    project-type: freestyle
-    concurrent: true
-    node: '{build-node}'
-
-    properties:
-      - infra-properties:
-          build-days-to-keep: '{build-days-to-keep}'
-
-    parameters:
-      - infra-parameters:
-          project: '{project}'
-          branch: '{branch}'
-          refspec: 'refs/heads/{branch}'
-          artifacts: '{archive-artifacts}'
-      - maven-exec:
-          maven-version: '{maven-version}'
-
-    scm:
-      - gerrit-trigger-scm:
-          refspec: '$GERRIT_REFSPEC'
-          choosing-strategy: 'gerrit'
-          submodule-recursive: '{submodule-recursive}'
-
-    wrappers:
-      - infra-wrappers:
-          build-timeout: '{build-timeout}'
-
-    triggers:
-      - gerrit-trigger-patch-submitted:
-          server: '{server-name}'
-          project: '{project}'
-          branch: '{branch}'
-          files: '**'
-
-    builders:
-      - provide-maven-settings:
-          global-settings-file: 'global-settings'
-          settings-file: '{mvn-settings}'
-      - maven-target:
-          maven-version: '{maven-version}'
-          goals: 'clean install -DskipTests=true -B
-            -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
-          settings: '{mvn-settings}'
-          settings-type: cfp
-          global-settings: 'global-settings'
-          global-settings-type: cfp
-          maven-opts:
-            - maven.test.skip=true
-
-    publishers:
-      - infra-shiplogs:
-          maven-version: '{maven-version}'
-
-- job-template:
-    # Job template for Java verify jobs
-    #
-    # The purpose of this job template is to run:
     # 1. maven clean install
     #
     # Required Variables:
@@ -77,6 +13,7 @@
     project-type: freestyle
     concurrent: true
     node: '{build-node}'
+    pattern: '**'
 
     properties:
       - infra-properties:
@@ -108,7 +45,7 @@
           server: '{server-name}'
           project: '{project}'
           branch: '{branch}'
-          files: '**'
+          files: '{obj:pattern}'
 
     builders:
       - provide-maven-settings:
@@ -189,68 +126,6 @@
       - checkstyle-result
 
 - job-template:
-    # Job template for Java verify jobs that takes a maven template
-    #
-    # The purpose of this job template is to run:
-    # 1. maven clean install -P {mvn-profile}
-    #
-    # Required Variables:
-    #     branch:    git branch (eg. stable/lithium or master)
-
-    name: '{project-name}-{stream}-verify-profile-java'
-
-    project-type: freestyle
-    concurrent: true
-    node: '{build-node}'
-
-    properties:
-      - infra-properties:
-          build-days-to-keep: '{build-days-to-keep}'
-
-    parameters:
-      - infra-parameters:
-          project: '{project}'
-          branch: '{branch}'
-          refspec: 'refs/heads/{branch}'
-          artifacts: '{archive-artifacts}'
-      - maven-exec:
-          maven-version: '{maven-version}'
-
-    scm:
-      - gerrit-trigger-scm:
-          refspec: '$GERRIT_REFSPEC'
-          choosing-strategy: 'gerrit'
-          submodule-recursive: '{submodule-recursive}'
-
-    wrappers:
-      - infra-wrappers:
-          build-timeout: '{build-timeout}'
-
-    triggers:
-      - gerrit-trigger-patch-submitted:
-          server: '{server-name}'
-          project: '{project}'
-          branch: '{branch}'
-          files: '{files}'
-
-    builders:
-      - provide-maven-settings:
-          global-settings-file: 'global-settings'
-          settings-file: '{mvn-settings}'
-      - maven-target:
-          maven-version: '{maven-version}'
-          goals: 'clean install -P {mvn-profile} -B
-            -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
-          settings: '{mvn-settings}'
-          settings-type: cfp
-          global-settings: 'global-settings'
-          global-settings-type: cfp
-
-    publishers:
-      - infra-shiplogs:
-          maven-version: '{maven-version}'
-
-- job-template:
     # Job template for Java verify jobs with POM not at the root
     #
     # The purpose of this job template is to run: