...
Table of Contents | ||
---|---|---|
|
Working with bundles
Is there an easy way to update bundles in a running installation during development?
The Sling Maven Plugin provides an install goal which is able to install or update a bundle in a running Sling application (if the Sling web console is deployed). If the plugin properties are configured accordingly you can just mvn clean package org.apache.sling:maven-sling-plugin:install
and the bundle is uploaded.
You can use the settings.xml
to set the url to your Sling application. See the Sling Maven Plugin for more information.
Classloading issues
Accessing Classes from the Environment
...
If on the other hand you cannot prevent the installation of such bundles and hence the export of the respective packages, you might want to set the org.osgi.framework.bootdelegation
property conditionally as described above in the answer to how this property is supported in Sling. This ensures the property is only set, if the classes are actually available. This should be used as a fall back only, if the org.osgi.framework.system.packages
method does not work.
Is there an easy way to update bundles in a running installation during development?
The Sling Maven Plugin provides an install goal which is able to install or update a bundle in a running Sling application (if the Sling web console is deployed). If the plugin properties are configured accordingly you can just mvn clean package org.apache.sling:maven-sling-plugin:install
and the bundle is uploaded.
You can use the settings.xml
to set the url to your Sling application. See the Sling Maven Plugin for more information.