You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2021/03/14 22:46:38 UTC

[GitHub] [sling-org-apache-sling-feature-launcher] stbischof commented on a change in pull request #19: SLING-10211: add Bundle-Metadata, build with bnd

stbischof commented on a change in pull request #19:
URL: https://github.com/apache/sling-org-apache-sling-feature-launcher/pull/19#discussion_r593973781



##########
File path: pom.xml
##########
@@ -41,34 +42,44 @@
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                <execution>
-                    <id>unpack-dependencies</id>
-                    <phase>prepare-package</phase>
-                    <goals>
-                        <goal>unpack-dependencies</goal>
-                    </goals>
-                    <configuration>
-                        <excludes>META-INF/**</excludes>
-                        <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                        <overWriteReleases>false</overWriteReleases>
-                        <overWriteSnapshots>true</overWriteSnapshots>
-                        <includeArtifactIds>osgi.core,commons-text,commons-lang3,org.apache.sling.feature,org.osgi.util.function,org.apache.felix.cm.json,org.apache.sling.commons.johnzon,org.apache.felix.converter,commons-cli,slf4j-api,slf4j-simple</includeArtifactIds>
+                <plugin>
+                    <groupId>biz.aQute.bnd</groupId>
+                    <artifactId>bnd-maven-plugin</artifactId>
+                        <configuration>
+                        <bnd><![CDATA[
+                 Main-Class: org.apache.sling.feature.launcher.impl.Main
+                -exportcontents:\
+                 org.apache.sling.feature.launcher.spi.*
+                -conditionalpackage:\
+                 javax.json*,\
+                 org.apache.commons.cli.*,\
+                 org.apache.commons.lang3.*,\
+                 org.apache.commons.text.*,\
+                 org.apache.felix.cm.json.*,\
+                 org.apache.felix.converter.*,\
+                 org.apache.johnzon.core.*,\
+                 org.apache.johnzon.core.util.*,\
+                 org.apache.sling.feature.*,\
+                 org.osgi.*,\

Review comment:
       I like to have the bundle-meta-data in a manifest. Together with the smaller build that is the only reason.
   
   I just packaged everything that was in before. Just because of -conditionalpackage the bundle is 400kb smaller than before!
   
   We are using [BundleStartLevel](https://github.com/apache/sling-org-apache-sling-feature-launcher/blob/14fd3f7476214baf2ee114e71d50f6518fd75fd8/src/main/java/org/apache/sling/feature/launcher/impl/launchers/AbstractRunner.java#L323) and the static field `FrameworkEvent.STOPPED_SYSTEM_REFRESHED` in bootstrap.
   
   not sure how to remove the `BundleStartLevel`
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org