use of org.apache.tools.ant.taskdefs.Manifest in project processdash by dtuma.
the class PackageLaunchProfile method createResourceJar.
private void createResourceJar(File tmpFile) throws IOException, ManifestException {
String contentToken = calculateContentToken();
Manifest mf = buildManifest(contentToken);
Jar jar = new Jar();
jar.bindToOwner(this);
jar.addConfiguredManifest(mf);
for (FileSet fs : filesets) jar.addFileset(fs);
tmpFile.delete();
jar.setDestFile(tmpFile);
jar.execute();
}
use of org.apache.tools.ant.taskdefs.Manifest in project processdash by dtuma.
the class PackageLaunchProfile method buildManifest.
private Manifest buildManifest(String contentToken) throws ManifestException {
Manifest mf = Manifest.getDefaultManifest();
addAttribute(mf, DISTR_FORMAT_ATTR, "1.0");
addAttribute(mf, DISTR_NAME_ATTR, profilename);
addAttribute(mf, DISTR_ID_ATTR, profileid);
addAttribute(mf, DISTR_VERSION_ATTR, profileversion);
addAttribute(mf, DISTR_TOKEN_ATTR, contentToken);
if (hasValue(requireserver))
addAttribute(mf, DISTR_REQUIRES_ATTR, requireserver);
return mf;
}