That means the framework(s) you are using are not extending one provided by Jahia as is, they are using some of them most probably but they are not adding or overriding any of those frameworks.
In this case the integration should be straightforward, add your dependencies in your pom.xml file as usual. By default, your dependencies will be embedded in your bundle.
Then you need to configure the maven-bundle-plugin that will package your bundle into a jar, in this configuration you need to specify what package you want to export, and which dependencies you need to embed inside your bundle.
You can also decide to export some of your package, or packages provided by your dependency, by setting the export-package property :
<properties>
<export-package>{local-packages}</export-package>
</properties>
The Export-Package instruction allows you to define the package you want to export to other bundle, those ones will be the only accessible class from another bundle. Here you can use the Maven macro ‘local-packages’ to define that you want to export all your packages and/or list them manually. This is needed if you want to expose some classes of the embedded framework.
Using the Spring Framework in Jahia to declare services and wire them, is not recommended. OSGI built-in alternatives should be considered instead for that purpose.
Spring does however provide a lot of other useful functionalities, and Jahia offers multiple ways to use it in bundles as any other third-party library.
Be aware that options 2 and 3 are not compatible with modules using the capability mentioned in Services with the Spring Framework
Copyrights © 2002-2021 All Rights Reserved by Jahia Solutions Group SA
Privacy Policy / Terms of Use / Legal / Login