On 07.04.20 12:06, Bertrand Delacretaz wrote:
Hi,

On Tue, Apr 7, 2020 at 11:37 AM JCR <j...@proxymit.net> wrote:
...But what I
observe is, that MANIFEST.MF gets overriden on every change and even
package-info is present, the package in there gets set back to to private...
It looks like your build setup is causing trouble.

I recommend that you compare your project with one of ours that you
can gradually adapt to your needs.

You might start with
https://github.com/apache/sling-org-apache-sling-commons-mime for
example, which is a small standalone module change the public package
and/or class names for your initial test, build, verify that you can
use those services from your JSP and then gradually adapt or compare
with your code.

Hope this helps,
-Bertrand

Hi Bertrand,

Nice hearing from you!

Well, the problem is that there's a lot of outdated docu around. For instance, above commons-mime package contains a bnd.bnd file, which is not generated anymore (well, perhaps it is, but just process temporary). Among many others, the examples at felix.apache.org are not current, too. So, I've been chasing a lot of phantoms in the past few days. That wasn't the fun Sling usually provides.

As mentioned in my mail, there must be some hidden detail. Well, after days of research, I found it in the readme of the bnd-maven-plugin (https://github.com/bndtools/bnd/blob/master/maven/bnd-maven-plugin/README.md):

<configuration>
        <bnd><![CDATA[
-exportcontents:\
rome.testx.testaa
-sources: true
]]></bnd>
</configuration>

So this is the secret sauce that does the job. That needs to be added to the project's pom.xml.

Keywords: solved, osgi, bundle, bnd-maven-plugin 1.2.2, export-package, felix

-Juerg


Reply via email to