private void saveLatestServerInfo() {
        Element xmlResponse = docFactory.createDocument().addElement("version");
        if (serverUpdate != null) {
            Element component = xmlResponse.addElement("openfire");
            component.addAttribute("latest", serverUpdate.getLatestVersion());
            component.addAttribute( "changelog", serverUpdate.getChangelog() );
            component.addAttribute( "url", serverUpdate.getURL() );
        }
        // Write data out to conf/server-update.xml file.
        try {
            // Create the conf folder if required
            final Path confDir = JiveGlobals.getHomePath().resolve("conf");
            if (!Files.exists(confDir)) {
                Files.createDirectory(confDir);
            }

            final Path updateConfig = confDir.resolve("server-update.xml");

            // Create new server-update.xml with returned data.
            final String xmlString;
            try (final StringWriter out = new StringWriter()) {
                final XMLWriter writer = new XMLWriter(out, OutputFormat.createPrettyPrint());
                writer.write(xmlResponse);
                writer.flush();
                xmlString = out.toString();
                writer.close();
            }

            // Delete the content of the old server-update.xml file if it exists.
            Files.writeString(updateConfig,
                              xmlString,
                              StandardCharsets.UTF_8,
                              StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
        }
        catch (Exception e) {
            Log.error("A problem occurred when trying to save latest server info.", e);
        }
    }
Saves to conf/server-update.xml information about the latest Openfire release that is
available for download.
xmppserver/src/main/java/org/jivesoftware/openfire/update/UpdateManager.java