Child pages
  • Remove all disabled modules in Maven jobs
Skip to end of metadata
Go to start of metadata

To remove all disabled modules in Maven jobs

Jenkins.instance.getAllItems(hudson.maven.MavenModuleSet.class).findAll{job -> job.isBuildable()}.each{
job ->
  job.getDisabledModules(true).each{module -> module.delete()} 
  println(job.name+" cleaned")
}
  • No labels