0

This must be a simple rookie mistake but

    def hi = hudson.model.Hudson.instance
   hi.getItems(hudson.model.Project).each {project ->
   println(project.displayName)
   def di = project.getDownstreamProjects

   println(di.name)

}

just returns

groovy.lang.MissingPropertyException: No such property: getDownstreamProjects for class: hudson.model.FreeStyleProject

but the doc say the method exist on the AbstractProject What do I do wrong?

Jonke
  • 6,525
  • 2
  • 25
  • 40

1 Answers1

2

You forgot the () after getDownstreamProjects. It's a method not a property ;-)

pushy
  • 9,535
  • 5
  • 26
  • 45