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

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major
    • None
    • Environment:
      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()

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

              Created:
              Updated: