processDir(jbossHome);
try
{
DocumentFactory df = DocumentFactory.getInstance();
Document doc = df.createDocument();
Element root = doc.addElement("jar-versions");
Iterator iter = jars.iterator();
while( iter.hasNext() )
{
JarInfo info = (JarInfo) iter.next();
info.writeXML(root);
}
File versionsXml = new File(jbossHome, "jar-versions.xml");
FileWriter versionInfo = new FileWriter(versionsXml);
OutputFormat outformat = OutputFormat.createPrettyPrint();
XMLWriter writer = new XMLWriter(versionInfo, outformat);
writer.setEscapeText(true);
writer.write(doc);
writer.flush();
versionInfo.close();
}
catch(IOException e)
{
e.printStackTrace();
}