Question

How do I include bundles in my CRX package or install them by dropping them in the JCR repository via webdav?

Answer, Resolution

You can install OSGi bundles via CRX packages or by dropping them in the CRX repository via webdav. This can be done by including the bundle in a folder named install under your application directory.

For example if you had an application "testapp" and a bundle you wanted to install called testappbundle-1.0.jar you could drop the bundle in the following folder /apps/testapp/install/testappbundle-1.0.jar.

See detailed info about this here [1].

Inclusion in a CRX Package

To include an OSGi bundle in a CRX package do the following:

  1. Log into webdav (see here [2] for how to connect to CRX webdav)
  2. Via webdav create an install folder under your application and copy your bundle under the new folder /apps/<appname>/install/
  3. Log into the CRX web application (http://host:port/crx) as admin
  4. Go to the CRX "Package Manager" and create a new package or modify your existing application code package
  5. Under the path definition /apps/<appname>, define the following include and exclude rules
  • include pattern="/apps/<appname>(/.*)?"
  • exclude pattern="/apps/<appname>/install(/.*)?"

Note: these rules ensure that your bundle will be reinstalled upon every reinstall of the package. See here for more info on this issue here [3]

Applies to

CQ5.X

References

[1] http://sling.apache.org/site/jcr-installer-jcrjcrinstall-and-osgiinstaller.html
[2] http://dev.day.com/docs/en/crx/current/developing/accessing_the_crx.html#WebDAV Access
[3] Bundle fails to install

تم ترخيص هذا العمل بموجب الترخيص العام غير المعدل الخاص بالإسناد وعدم التجارة والمشاركة الإصدار 3.0 ‏من ‏‏Creative Commons‏‏  إن بنود Creative Commons لا تشمل منشورات Twitter™‎ وFacebook.

إشعارات قانونية   |   سياسة الخصوصية على الإنترنت