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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: