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

No signature of method: org.apache.maven.model.Model.setScm()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins 2.73.2
      Pipeline 2.5
      Pipeline Utility steps 1.5.1

      I have the following code:

      def mavenPom = readMavenPom(file: "pom.xml")

      if (mavenPom.getScm() == null){
       org.apache.maven.model.Scm mavenScm = new org.apache.maven.model.Scm()
       mavenPom.getScm().setConnection("scm:git:${scmModel.scmRepository.url}")
       mavenPom.setScm(mavenScm)
      }

       I'm getting the following exception.

      groovy.lang.MissingMethodException: No signature of method: org.apache.maven.model.Model.setScm() is applicable for argument types: (org.apache.maven.model.Scm) values: [org.apache.maven.model.Scm@a54de52]
      Possible solutions: setScm(org.apache.maven.model.Scm), getScm(), setName(java.lang.String), setUrl(java.lang.String), getId(), getName()

            rsandell rsandell
            ricardf Ricard F
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: