private static void writeJettyXml(JavaResource resource, File outputDirectory, File realmFile)
     throws IOException {
   File file = new File(outputDirectory, "jetty.xml");
   String content =
       resource.asUTF8String().replace("${realm.properties}", realmFile.getAbsolutePath());
   Files.write(content, file, UTF_8);
 }
 private static File copyRealmFileToConfiguration(File tempDir) throws IOException {
   File file = new File(tempDir, "realm.properties");
   Files.write(realmProperties.asUTF8String(), file, UTF_8);
   return file;
 }