Ryo Tagami c28ac736be Fix Multiple SCMs Plugin child XML format
Current implementation of Multiple SCMs Plugin seems to be broken.  Test
with following combination of Jenkins and Multiple SCMs Plugin

* Jenkins 2.2 (latest) + multiple-scms 0.6 (latest)
* Jenkins 1.651.1 (latest LTS) + multiple-scms 0.6 (latest)
* Jenkins 1.409.1 (oldest LTS) + multiple-scms 0.1 (oldest)
* Jenkins 1.396 (oldest) + multiple-scms 0.1 (oldest)

all emitted XML with following format (apart from `plugin=` here and
there):

```
  <scm class="org.jenkinsci.plugins.multiplescms.MultiSCM">
    <scms>
      <hudson.scm.SubversionSCM>
        :
      </hudson.scm.SubversionSCM>
      <hudson.scm.CVSSCM>
        :
      </hudson.scm.CVSSCM>
    </scms>
  </scm>
```

whereas current Jenkins Job Builder implementation emits XML with
following format:

```
  <scm class="org.jenkinsci.plugins.multiplescms.MultiSCM">
    <scms>
      <scm class="hudson.scm.SubversionSCM">
        :
      </scm>
      <scm class="hudson.scm.CVSSCM">
        :
      </scm>
    </scms>
  </scm>
```

This commit will fix this problem by modifying child `scm` node to a
correct format before adding to the parent `scm` node.

Change-Id: I0b9115c156a06a7fbdf529341dfc6100edf225aa
Signed-off-by: Ryo Tagami <rtagami@airstrip.jp>
2016-05-11 14:19:07 +09:00
..