void configureManifest(Manifest manifest) { // set manifest entries from Moxie metadata Manifest mft = new Manifest(); 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); try { manifest.merge(mft, true); } catch (ManifestException e) { console.error(e, "Failed to configure manifest!"); } }
/** * Merge the contents of the given manifest into this manifest * * @param other the Manifest to be merged with this one. * @throws ManifestException if there is a problem merging the manifest according to the Manifest * spec. */ public void merge(Manifest other) throws ManifestException { merge(other, false); }