Manifest manifest = new Manifest(is);
Attributes includedAttributes = manifest.getMainAttributes();
Attributes shadedAttributes = shadedManifest.getMainAttributes();
Set shadedImportPackages = new LinkedHashSet(Arrays.asList(
shadedAttributes.getValue("Import-Package").split(",")));
shadedImportPackages.removeAll(Arrays.asList(
includedAttributes.getValue("Export-Package").split(",")));
shadedImportPackages.addAll(Arrays.asList(
includedAttributes.getValue("Import-Package").split(",")));
shadedAttributes.putValue("Import-Package",
StringUtils.join(shadedImportPackages.iterator(), ","));