} else if (entry.getName().startsWith("org/apache/batik/")) {
logger.log(TRACE, "Skip " + entry.getName());
continue entries;
+ } else if (entry.getName().startsWith("META-INF/NOTICE")) {
+ logger.log(WARNING, "Skip " + entry.getName() + " from " + artifact);
+ // TODO merge them?
+ continue entries;
} else {
throw new IllegalStateException("File " + target + " from " + artifact + " already exists");
}
}
if (!fileProps.containsKey(EXPORT_PACKAGE.toString())) {
- fileProps.put(EXPORT_PACKAGE.toString(),
- "*;version=\"" + fileProps.getProperty(BUNDLE_VERSION.toString()) + "\"");
+ fileProps.put(EXPORT_PACKAGE.toString(), "*");
}
// BND analysis
nameVersion.setName(ourSymbolicName);
}
}
+
+ // create bundle dir
bundleDir = targetBase.resolve(nameVersion.getName() + "." + nameVersion.getBranch());
+ if (Files.exists(bundleDir)) {
+ logger.log(WARNING, "Bundle dir " + bundleDir
+ + " already exists, probably from a previous failed build, deleting it...");
+ deleteDirectory(bundleDir);
+ }
// copy original MANIFEST
if (sourceManifest != null) {
arch = libRelativePath.getName(1).toString();
}
-// if (!embed) {
// copy entries
JarEntry entry;
entries: while ((entry = jarIn.getNextJarEntry()) != null) {
origin.deleted.add(bundleDir.relativize(target).toString());
}
logger.log(TRACE, () -> "Copied " + target);
-// }
}
}
entries.get(BUNDLE_SYMBOLICNAME.toString()) + ";singleton:=true");
}
-// if (embed) {// copy embedded jar
-// Files.copy(file, bundleDir.resolve(file.getFileName()));
-// entries.put(ManifestHeader.BUNDLE_CLASSPATH.toString(), file.getFileName().toString());
-// }
-
// Final MANIFEST decisions
// We also check the original OSGi metadata and compare with our changes
for (String key : entries.keySet()) {