jarOut = new JarOutputStream(out, manifest);
JarEntry jarEntry = null;
while ((jarEntry = jarIn.getNextJarEntry()) != null) {
- JarEntry newJarEntry = new JarEntry(jarEntry.getName());
- jarOut.putNextEntry(newJarEntry);
- IOUtils.copy(jarIn, jarOut);
- jarIn.closeEntry();
- jarOut.closeEntry();
+ if (!jarEntry.getName().equals("META-INF/MANIFEST.MF")) {
+ JarEntry newJarEntry = new JarEntry(jarEntry.getName());
+ jarOut.putNextEntry(newJarEntry);
+ IOUtils.copy(jarIn, jarOut);
+ jarIn.closeEntry();
+ jarOut.closeEntry();
+ }
}
} catch (IOException e) {
throw new SlcException("Could not copy jar with MANIFEST "
.getProperty(SLC_ARTIFACT_CLASSIFIER).getString(),
node.getProperty(SLC_ARTIFACT_EXTENSION).getString(), node
.getProperty(SLC_ARTIFACT_VERSION).getString());
+ } else if (node.isNodeType(SlcTypes.SLC_MODULE_COORDINATES)) {
+ return new DefaultArtifact(node.getProperty(SLC_CATEGORY)
+ .getString(), node.getProperty(SLC_NAME).getString(),
+ "jar", node.getProperty(SLC_VERSION).getString());
} else {
throw new SlcException("Unsupported node type for " + node);
}