manifest = new DefaultManifest(getFileResolver());
// Add these as separate specs, so they are not affected by the changes to the main spec
metaInf = (CopySpecInternal) getRootSpec().addFirst().into("META-INF");
metaInf.addChild().from(new Callable<FileTreeAdapter>() {
public FileTreeAdapter call() throws Exception {
MapFileTree manifestSource = new MapFileTree(getTemporaryDirFactory(), getFileSystem());
manifestSource.add("MANIFEST.MF", new Action<OutputStream>() {
public void execute(OutputStream outputStream) {
Manifest manifest = getManifest();
if (manifest == null) {
manifest = new DefaultManifest(null);
}