private Manifest createManifest(List<ArtifactData> files) throws Exception {
Manifest manifest = new Manifest();
Attributes main = manifest.getMainAttributes();
main.putValue("Manifest-Version", "1.0");
main.putValue("DeploymentPackage-SymbolicName", m_symbolicName);
main.putValue("DeploymentPackage-Version", m_version);
for (ArtifactData file : files) {
if (file.isBundle()) {
Attributes a = new Attributes();
a.putValue("Bundle-SymbolicName", file.getSymbolicName());
a.putValue("Bundle-Version", file.getVersion());
if (file.isCustomizer()) {
a.putValue("DeploymentPackage-Customizer", "true");
a.putValue("Deployment-ProvidesResourceProcessor", file.getProcessorPid());
}
manifest.getEntries().put(file.getFilename(), a);
}
else {
Attributes a = new Attributes();
a.putValue("Resource-Processor", file.getProcessorPid());
manifest.getEntries().put(file.getFilename(), a);
}
}
return manifest;
}