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

ExportXMLWordPrintable

      Pipeline scripts fail to find method declaring parameter type. The script below will fail to execute "doStuff", with NoSuchMethodError.

      This used to work, but rolling back security and groovy didn't help, and utility steps (which defines readMavenPom) wasn't available for rollback. On a simple test, "Integer n" works as a type parameter, so this might well be specific to the object returned by readMavenPom().

      import org.apache.maven.model.Model
      
      stage ("initial") {
          node ('mesos') {
      
             git url: 'https://github.com/jglick/simple-maven-project-with-tests.git'
      
              Model pom = readMavenPom()
              
              echo "Class of pom is ${pom.class}"
              
              doThings(pom)
              
              doStuff(pom)
          }
      }
      
      def doThings(pom) {
          echo "Got something"
      }
      
      def doStuff(Model pom) {
          echo "Got pom"
      }
      
      

            Assignee:
            Unassigned
            Reporter:
            Daniel Sobral
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: