}
@Override
protected void configureManifest(Manifest manifest) {
// set manifest entries from Moxie metadata
Manifest mft = new Manifest();
setManifest(mft, "Manifest-Version", "1.0");
setManifest(mft, "Created-By", "Moxie v" + Toolkit.getVersion());
setManifest(mft, "Build-Jdk", System.getProperty("java.version"));
setManifest(mft, "Build-Date", new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
setManifest(mft, "Implementation-Title", Key.name);
setManifest(mft, "Implementation-Vendor", Key.organization);
setManifest(mft, "Implementation-Vendor-Id", Key.groupId);
setManifest(mft, "Implementation-Vendor-URL", Key.url);
setManifest(mft, "Implementation-Version", Key.version);
setManifest(mft, "Bundle-Name", Key.name);
setManifest(mft, "Bundle-SymbolicName", Key.artifactId);
setManifest(mft, "Bundle-Version", Key.version);
setManifest(mft, "Bundle-Vendor", Key.organization);
setManifest(mft, "Maven-Url", Key.mavenUrl);
setManifest(mft, "Commit-Id", Key.commitId);
if (main.getManifest() == null) {
// set the manifest of the embedded main jar
try {
File file = File.createTempFile("moxie-", ".mft");
FileOutputStream os = new FileOutputStream(file);
PrintWriter writer = new PrintWriter(os);
mft.write(writer);
writer.flush();
os.close();
main.setManifest(file);
} catch (FileNotFoundException e) {
console.error(e, "Failed to set main.jar manifest!");