def m2_repository_cleanup(registry, xml_parent, data):
 m2repo = XML.SubElement(xml_parent, 'hudson.plugins.m2__repo__reaper.M2RepoReaperWrapper')
 m2repo.set('plugin', 'm2-repo-reaper')
 patterns = data.get('patterns', [])
 XML.SubElement(m2repo, 'artifactPatterns').text = ','.join(patterns)
 p = XML.SubElement(m2repo, 'patterns')
 for pattern in patterns:
  XML.SubElement(p, 'string').text = pattern

def m2_repository_cleanup ( registry , xml_parent , data ) : m2repo = XML . SubElement ( xml_parent , 'hudson.plugins.m2__repo__reaper.M2RepoReaperWrapper' ) m2repo . set ( 'plugin' , 'm2-repo-reaper' ) patterns = data . get ( 'patterns' , [ ] ) XML . SubElement ( m2repo , 'artifactPatterns' ) . text = ',' . join ( patterns ) p = XML . SubElement ( m2repo , 'patterns' ) for pattern in patterns : XML . SubElement ( p , 'string' ) . text = pattern
yaml: m2-repository-cleanup configure m2 repository cleanup requires the jenkins :jenkins-wiki:m2 repository cleanup <m2+repository+cleanup+plugin> .