Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-13779

Git Publisher (tagging) can't work with multipe SCM (ClassCastException: org.jenkinsci.plugins.multiplescms.MultiSCM cannot be cast to hudson.plugins.git.GitSCM)

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      when using multiple SCM plugin together with Git Publisher the git publisher shows and ERROR message:
      (can we use for "Target remote name" the name specified in SCM?

      Status Code: 500

      Exception:
      Stacktrace:
      java.lang.ClassCastException: org.jenkinsci.plugins.multiplescms.MultiSCM cannot be cast to hudson.plugins.git.GitSCM
      at hudson.plugins.git.GitPublisher$DescriptorImpl.doCheckRemote(GitPublisher.java:424)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
      at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
      at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
      at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:488)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:162)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:63)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
      at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:215)
      at winstone.RequestHandlerThread.run(RequestHandlerThread.java:138)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

        Attachments

          Activity

          Hide
          srinathc Srinath C added a comment -

          Doesn't work when even when using the template plugin to use git configuration from another project.

          Exception: java.lang.ClassCastException: hudson.plugins.templateproject.ProxySCM cannot be cast to hudson.plugins.git.GitSCM
          Stacktrace:
          javax.servlet.ServletException: java.lang.ClassCastException: hudson.plugins.templateproject.ProxySCM cannot be cast to hudson.plugins.git.GitSCM
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:616)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
          at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
          at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
          at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
          at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:488)
          at org.kohsuke.stapler.Stapler.service(Stapler.java:162)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
          at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
          at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
          at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
          at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
          at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
          at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
          at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
          at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
          at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
          at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
          at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:63)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
          at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
          at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
          at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
          at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
          at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50)
          at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
          at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
          at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
          at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
          at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
          at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
          at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:215)
          at winstone.RequestHandlerThread.run(RequestHandlerThread.java:138)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:679)
          Caused by: java.lang.ClassCastException: hudson.plugins.templateproject.ProxySCM cannot be cast to hudson.plugins.git.GitSCM
          at hudson.plugins.git.GitPublisher$DescriptorImpl.doCheckRemote(GitPublisher.java:508)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
          at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
          at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
          at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
          at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
          ... 60 more

          Show
          srinathc Srinath C added a comment - Doesn't work when even when using the template plugin to use git configuration from another project. Exception: java.lang.ClassCastException: hudson.plugins.templateproject.ProxySCM cannot be cast to hudson.plugins.git.GitSCM Stacktrace: javax.servlet.ServletException: java.lang.ClassCastException: hudson.plugins.templateproject.ProxySCM cannot be cast to hudson.plugins.git.GitSCM at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:616) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:488) at org.kohsuke.stapler.Stapler.service(Stapler.java:162) at javax.servlet.http.HttpServlet.service(HttpServlet.java:45) at winstone.ServletConfiguration.execute(ServletConfiguration.java:248) at winstone.RequestDispatcher.forward(RequestDispatcher.java:333) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:63) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at winstone.RequestDispatcher.forward(RequestDispatcher.java:331) at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:215) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:138) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:679) Caused by: java.lang.ClassCastException: hudson.plugins.templateproject.ProxySCM cannot be cast to hudson.plugins.git.GitSCM at hudson.plugins.git.GitPublisher$DescriptorImpl.doCheckRemote(GitPublisher.java:508) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574) ... 60 more
          Hide
          drf1 Martin Hubert added a comment - - edited

          Patch for git-plugin

          Show
          drf1 Martin Hubert added a comment - - edited Patch for git-plugin
          Hide
          drf1 Martin Hubert added a comment -

          The problem is located in the git-plugin which does not handle MultiSCM in GitPublisher.

          I created a patch.

          The patch also has a new feature "update Tag". If activated in git publish tag it will delete an existing tag and set it to the current position.

          Please integrate my patch in the next release of git-plugin

          Show
          drf1 Martin Hubert added a comment - The problem is located in the git-plugin which does not handle MultiSCM in GitPublisher. I created a patch. The patch also has a new feature "update Tag". If activated in git publish tag it will delete an existing tag and set it to the current position. Please integrate my patch in the next release of git-plugin
          Hide
          bdellegrazie Brett Delle Grazie added a comment -

          Issue still exists with Git Plugin 1.1.26 with Jenkins LTS 1.480.1

          Show
          bdellegrazie Brett Delle Grazie added a comment - Issue still exists with Git Plugin 1.1.26 with Jenkins LTS 1.480.1
          Hide
          thamps Ajith Thampi added a comment -

          Any update on this fix? I am facing the exact same issue with MultiSCM.

          Show
          thamps Ajith Thampi added a comment - Any update on this fix? I am facing the exact same issue with MultiSCM.
          Hide
          cchou Chris Chou added a comment -

          Any help with this? I tried applying the patch to the most recent version of git plugin but unfortunately it failed.

          Show
          cchou Chris Chou added a comment - Any help with this? I tried applying the patch to the most recent version of git plugin but unfortunately it failed.
          Hide
          eyaldavid75 Eyal David added a comment - - edited

          Hi Is there a chance that this bug will be fixed ?

          Show
          eyaldavid75 Eyal David added a comment - - edited Hi Is there a chance that this bug will be fixed ?
          Hide
          kriskra Kristian Kraljic added a comment -

          I am also interested in a fix... But I assume, as it hasn't been fixed the past 3 years nothing will happen unfortunately! Bummer. Generally I took a quick look at the patch provided by Martin Hubert. The idea is to add a simple:

          if(scm instanceof MultiSCM) {
             for(SCM multiScm : ((MultiSCM)scm).getConfiguredSCMs()) {
                if(multiScm instanceof GitSCM)
                   oldPerform((GitSCM) multiScm, build, launcher, listener);
             ...
          else if(scm instanceof GitSCM)
             return oldPerform((GitSCM) scm, build, launcher, listener);
          else return false;
          

          (stripping a little logic for "success" management) to the current perform method... It would be great if you could provide such a patch.

          Show
          kriskra Kristian Kraljic added a comment - I am also interested in a fix... But I assume, as it hasn't been fixed the past 3 years nothing will happen unfortunately! Bummer. Generally I took a quick look at the patch provided by Martin Hubert. The idea is to add a simple: if (scm instanceof MultiSCM) { for (SCM multiScm : ((MultiSCM)scm).getConfiguredSCMs()) { if (multiScm instanceof GitSCM) oldPerform((GitSCM) multiScm, build, launcher, listener); ... else if (scm instanceof GitSCM) return oldPerform((GitSCM) scm, build, launcher, listener); else return false ; (stripping a little logic for "success" management) to the current perform method... It would be great if you could provide such a patch.
          Hide
          brantone Brantone added a comment -
          Show
          brantone Brantone added a comment - Potential fix would be similar to https://github.com/jenkinsci/multiple-scms-plugin/pull/9
          Hide
          jekeller Jacob Keller added a comment - - edited

          So the problem is that we can't generically support each type of SCM wrapper, and I don't think the maintainer wants to put unnecessary dependency on plugins which aren't required to use Git..?

          Is there a way to optionally add dependency without requiring they all be installed?

          Show
          jekeller Jacob Keller added a comment - - edited So the problem is that we can't generically support each type of SCM wrapper, and I don't think the maintainer wants to put unnecessary dependency on plugins which aren't required to use Git..? Is there a way to optionally add dependency without requiring they all be installed?
          Hide
          wsaxon Will Saxon added a comment -

          I was looking at extending something the other day, and the docs said you can a) add the plugin to the pom.xml and specify <optional>true</optional> on it, and b) use the optional=true modifier on the @Extension attribute if appropriate.

          Show
          wsaxon Will Saxon added a comment - I was looking at extending something the other day, and the docs said you can a) add the plugin to the pom.xml and specify <optional>true</optional> on it, and b) use the optional=true modifier on the @Extension attribute if appropriate.
          Hide
          jekeller Jacob Keller added a comment -

          Ok. That would help. But what if I'm not adding an extention point, just trying to use a class, ie: I need to be able to check if the SCM is a multi-scm? I don't know if that is reasonably doable or not...

          Show
          jekeller Jacob Keller added a comment - Ok. That would help. But what if I'm not adding an extention point, just trying to use a class, ie: I need to be able to check if the SCM is a multi-scm? I don't know if that is reasonably doable or not...
          Hide
          rodrigc Craig Rodrigues added a comment -

          Suggest that you migrate to Pipeline plugin, which offers a supported way of checking out from multiple scms
          https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin

          Show
          rodrigc Craig Rodrigues added a comment - Suggest that you migrate to Pipeline plugin, which offers a supported way of checking out from multiple scms https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin
          Hide
          olivergondza Oliver Gondža added a comment -

          Craig Rodrigues, Is there any support for pushing in pipeline? I do not see that on https://jenkins.io/doc/pipeline/steps/ for git or workflow-scm-step. In case users are expected to run that from shell, I do not think this justify as closing reason since used could do that with freestyle as well (multiple SCMs + git push from shell). Consuming credentials from Jenkins is one problem I can see.

          Show
          olivergondza Oliver Gondža added a comment - Craig Rodrigues , Is there any support for pushing in pipeline? I do not see that on https://jenkins.io/doc/pipeline/steps/ for git or workflow-scm-step. In case users are expected to run that from shell, I do not think this justify as closing reason since used could do that with freestyle as well (multiple SCMs + git push from shell). Consuming credentials from Jenkins is one problem I can see.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            casey1911 Stanislav Jursky
            Votes:
            22 Vote for this issue
            Watchers:
            26 Start watching this issue

              Dates

              Created:
              Updated: