-
-
Save tmarwen/4768937abb6d31ebfd4819808229383b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
import groovy.xml.MarkupBuilder | |
def xml = new XmlSlurper().parse(new File(args[0])); | |
def sw = new StringWriter() | |
def b = new MarkupBuilder(sw) | |
def i = 0; | |
b.dependencyManagement() { | |
dependencies() { | |
for (m in xml.modules.module) { | |
if (m.text().endsWith('-bom')) continue; | |
dependency() { | |
groupId('${project.groupId}'); | |
artifactId(m.text()); | |
version('${project.version}'); | |
} | |
} | |
} | |
} | |
println sw; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment