This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag slingstart-maven-plugin-1.4.0 in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
commit e8fd2c9d972db939c1836fef48bc7c834be3cbc2 Author: Bertrand Delacretaz <[email protected]> AuthorDate: Mon Dec 21 16:20:50 2015 +0000 SLING-5379 - add BSNRenamer git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1721206 13f79535-47bb-0310-9956-ffa450edef68 --- .../sling/maven/slingstart/PreparePackageMojo.java | 30 +--------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java b/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java index e68cd0d..cef9ea1 100644 --- a/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java +++ b/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java @@ -48,7 +48,7 @@ import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.ResolutionScope; -import org.apache.sling.commons.osgi.BundleFileProcessor; +import org.apache.sling.commons.osgi.BSNRenamer; import org.apache.sling.provisioning.model.ArtifactGroup; import org.apache.sling.provisioning.model.Configuration; import org.apache.sling.provisioning.model.Feature; @@ -87,34 +87,6 @@ public class PreparePackageMojo extends AbstractSlingStartMojo { private static final String PROPERTIES_FILE = "sling_install.properties"; - /** BundleFileProcessor that can change the bundle symbolic name */ - static class BSNRenamer extends BundleFileProcessor { - private final String newBSN; - - BSNRenamer(File input, File outputFolder, String newBSN) { - super(input, outputFolder); - this.newBSN = newBSN; - } - - protected Manifest processManifest(Manifest inputMF) { - Attributes inputAttrs = inputMF.getMainAttributes(); - String orgBSN = inputAttrs.getValue("Bundle-SymbolicName"); - Manifest newMF = new Manifest(inputMF); - Attributes outputAttrs = newMF.getMainAttributes(); - outputAttrs.putValue("Bundle-SymbolicName", newBSN); - outputAttrs.putValue("X-Original-Bundle-SymbolicName", orgBSN); - return newMF; - } - - protected String getTargetFilename(Manifest inputJarManifest) { - String bver = inputJarManifest.getMainAttributes().getValue("Bundle-Version"); - if (bver == null) { - bver = "0.0.0"; - } - return newBSN + "-" + bver + ".jar"; - } - } - /** * To look up Archiver/UnArchiver implementations */ -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
