Print maven version for all Hudson jobs


/ Published in: Groovy
Save to your folder(s)

Ant or JDK versions printing makes via the same way. Use 'antName' or 'jdk' instead 'mavenName' string.


Copy this code and paste it in your HTML
  1. new File(System.getenv('HUDSON_HOME'), 'jobs').eachFile {j ->
  2. c = new File(j.absolutePath, 'config.xml')
  3. if (c.file) new XmlParser().parse(c).'**'.findAll{it.name() == 'mavenName'}.collect{"$j.name: ${it.text()}"}.unique().each {
  4. println it
  5. }
  6. }

URL: hudson_mvn_vers

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.