Force removal of Require-Bundle
[cc0/argeo-build.git] / src / org / argeo / build / Repackage.java
index 41362498aa5f430c2a5c5485789052008cafd544..60b15f007dbbf2777b73e7d15d859453a08e06f3 100644 (file)
@@ -174,7 +174,7 @@ public class Repackage {
                /** Maven repository, if not the default one. */
                ARGEO_ORIGIN_M2_REPO("Argeo-Origin-M2-Repo"), //
                /**
-                * Do not perform BND analysis of the origin component. Typically Import_package
+                * Do not perform BND analysis of the origin component. Typically Import-Package
                 * and Export-Package will be kept untouched.
                 */
                ARGEO_ORIGIN_NO_METADATA_GENERATION("Argeo-Origin-NoMetadataGeneration"), //
@@ -1028,6 +1028,8 @@ public class Repackage {
                        if (sourceManifest == null)
                                logger.log(WARNING, file + " has no manifest");
                        manifest = sourceManifest != null ? new Manifest(sourceManifest) : new Manifest();
+                       if (!doNotModify)
+                               manifest.getMainAttributes().remove("Require-Bundle");
 
                        String rawSourceSymbolicName = manifest.getMainAttributes().getValue(BUNDLE_SYMBOLICNAME.toString());
                        if (rawSourceSymbolicName != null) {