private void exportMeta(File baseDir) throws IOException { File file = new File(baseDir.getCanonicalPath(), "meta.json"); FileWriter writer = new FileWriter(file); Meta m = new Meta( getVersion(), new Date(), principalProvider.get().getPrincipalName(), getWebAppPrefix()); meta.export(mapper, writer, m); writer.close(); }
private void exportMeta(File baseDir, String cdnKey) throws IOException { File file = new File(baseDir.getCanonicalPath(), "meta.json"); FileWriter writer = null; try { writer = new FileWriter(file); Meta m = new Meta( getVersion(), new Date(), principalProvider.get().getPrincipalName(), null, cdnKey); meta.export(mapper, writer, m); } finally { if (writer != null) { writer.close(); } } }