- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
xml : unique elements?
Wed, 2010-09-08, 01:44
Hello,
I have this class where I'm generating an ivy configuration file. This version works except if I add the conf="" attribute to the dependency element like , it seems to automatically filter out duplicates. So without it, I get 12+ dependencies, with it, I only get three because there are three unique conf values. Is this the desired behavior? How can I make sure all of the dependencies will be included?
PS. Oddly, if I change the name of conf to cx, it outputs all dependencies, but obviously i can't run it in ivy.
thx,
Mike
/// class
class IvyXml(config:WebAppConfig) {
val ivy =
*,!sources,!javadoc" defaultconf="default">
{for(dp <- config.dependencies) yield
}
def saveToFile(path:String) = {
println("ivy: " + ivy)
XML.save(path, ivy, "UTF-8", true, null)
}
}
On Tue, Sep 7, 2010 at 5:44 PM, Michael Fortin <mikee@m410.us> wrote:
What's the type of config.dependencies? If it's a Set, and if Elem.hashCode is buggy (I haven't looked at it yet), you might see this kind of behaviour.
-0xe1a