Search in sources :

Example 1 with Manifest

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();
}
Also used : FileSet(org.apache.tools.ant.types.FileSet) Jar(org.apache.tools.ant.taskdefs.Jar) Manifest(org.apache.tools.ant.taskdefs.Manifest)

Example 2 with Manifest

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;
}
Also used : Manifest(org.apache.tools.ant.taskdefs.Manifest)

Aggregations

Manifest (org.apache.tools.ant.taskdefs.Manifest)2 Jar (org.apache.tools.ant.taskdefs.Jar)1 FileSet (org.apache.tools.ant.types.FileSet)1