Last active
October 19, 2015 10:50
-
-
Save tszpinda/657c80b2d57ea4a786ad to your computer and use it in GitHub Desktop.
read pom.xml
This file contains hidden or 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
def ant = new AntBuilder(); | |
def scanner = ant.fileScanner { | |
fileset(dir:'.') { | |
include(name:"**/pom.xml") | |
exclude(name:"**/target/") | |
} | |
} | |
def count = 0; | |
for (f in scanner) { | |
count ++; | |
if(count == 1) { | |
println("found $f"); | |
def root = new XmlSlurper().parse(f); | |
println root.version; | |
println root.artifactId; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment