private void removeExportPrivate(POMExtensibilityElement instructionsEl) { if (instructionsEl != null) { for (POMExtensibilityElement el : instructionsEl.getAnyElements()) { if (OSGiConstants.EXPORT_PACKAGE.equals(el.getQName().getLocalPart())) { instructionsEl.removeAnyElement(el); } if (OSGiConstants.PRIVATE_PACKAGE.equals(el.getQName().getLocalPart())) { instructionsEl.removeAnyElement(el); } } } } };
POMExtensibilityElement instructions = null; for (POMExtensibilityElement el : elems) { if (OSGiConstants.PARAM_INSTRUCTIONS.equals(el.getQName().getLocalPart())) { instructions = el; break; conf.addExtensibilityElement(instructions); elems = instructions.getExtensibilityElements(); POMExtensibilityElement activator = null; for (POMExtensibilityElement el : elems) { if (OSGiConstants.BUNDLE_ACTIVATOR.equals(el.getQName().getLocalPart())) { activator = el; break; instructions.addExtensibilityElement(activator); activator.setElementText(path);
List<POMExtensibilityElement> confEls = config.getConfigurationElements(); for (POMExtensibilityElement el : confEls) { if (OSGiConstants.PARAM_INSTRUCTIONS.equals(el.getQName().getLocalPart())) { instructionsEl = el; break; POMExtensibilityElement privateEl = ModelUtils.getOrCreateChild(instructionsEl, OSGiConstants.PRIVATE_PACKAGE, pomModel); exportEl.setElementText(exportIns.get(InstructionsConverter.EXPORT_PACKAGE)); privateEl.setElementText(exportIns.get(InstructionsConverter.PRIVATE_PACKAGE));
private POMExtensibilityElement findInstructions(PluginContainer cont) { Plugin felixPlugin = cont.findPluginById(OSGiConstants.GROUPID_FELIX, OSGiConstants.ARTIFACTID_BUNDLE_PLUGIN); if (felixPlugin != null) { Configuration config = felixPlugin.getConfiguration(); if (config != null) { List<POMExtensibilityElement> confEls = config.getConfigurationElements(); for (POMExtensibilityElement el : confEls) { if (OSGiConstants.PARAM_INSTRUCTIONS.equals(el.getQName().getLocalPart())) { return el; } } } } return null; }