Created
February 13, 2012 21:43
-
-
Save stevez/1820723 to your computer and use it in GitHub Desktop.
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 classpath = new XmlParser().parse('.classpath') | |
| classpath.each { | |
| println "${it.@kind} ${it.@path}" | |
| } | |
| def newEntry = new Node(classpath, 'classpathentry', [kind:'lib', path:'libs/abc.jar']) | |
| println "after adding a new entry:" | |
| classpath.each { | |
| println "${it.@kind} ${it.@path}" | |
| } | |
| String outxml = groovy.xml.XmlUtil.serialize( classpath ) | |
| println outxml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment