Posted By

alces on 03/06/13


ant config maven Hudson XmlParser jdk

Versions (?)

Print maven version for all Hudson jobs

 / Published in: Groovy

URL: hudson_mvn_vers

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

  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{ == 'mavenName'}.collect{"$ ${it.text()}"}.unique().each {
  4. println it
  5. }
  6. }

Report this snippet  

You need to login to post a comment.