Hi Hasini,

On Wed, 2018-05-30 at 09:30 +0530, Hasini Witharana wrote:
> Hi all,
> 
> I installed a new bundle using the command " mvn clean install
> sling:install". After that I checked the bundle in "
> http://localhost:8080/system/console/status-Bundles"; and bundle is
> active.
> But when I searched the bundle in "
> http://localhost:8080/system/console/components"; I can't find it.

I assume that you mean that the bundle has no components.

Looking at the commits you have referenced, I see the following isseus
to checl:

1. You have used the old org.apache.felix.scr.annotations. IIRC these
are not supported out-of-the box by the bnd-maven-plugin. Please use
the new OSGi annotations, see [1] and [2] for some examples.
2. There is no bnd.bnd file for the 'core' module, please add a minimal
one ( also reference [1] and [2] for examples ).

To make sure that you got everything right, the following workflow
works for me:

1. Run `mvn clean package` for the module
2. Check that target/classes/META-INF/MANIFEST.MF exists
3. Check that the MANIFEST.MF file has a 'Bundle-SymbolicName' header
(entry)
4. Check that target/classes/OSGI-INF exists and has an xml file for
each defined OSGi component ( Sling servlet or anything else annotated
with @Component ) .
5. Check that the MANIFEST.MF file has a Service-Component header which
lists all the XML files for target/classes/OSGI-INF.

If step 3 is incorrect, check that you have the bnd-maven-plugin
executing.

If step 4 or 5 are incorrect, check that you are using the right
annotations.

This checklist and the links should help you, but please ask if there's
anything else unclear.

Hope this helps,

Robert

> 
> The code is committed in
> https://github.com/apache/sling-whiteboard/pull/14/commits/a76d0dd889
> 7d1b1d211deeace1023c98468f4830
> .
> <https://github.com/apache/sling-whiteboard/pull/14/commits/a76d0dd88
> 97d1b1d211deeace1023c98468f4830>
> 
> I am trying to register a Servlet  using a path.
> 
> Is this an error with the code or with the installation?
> 
> Thank You.

[1]: https://github.com/apache/sling-whiteboard/pull/14#discussion_r190518625
[2]: https://github.com/apache/sling-whiteboard/pull/14#discussion_r190520244

Reply via email to