Closed kwin closed 3 years ago
Recommendation is to separate this in two deployment packages to avoid issues with AECU being not yet installed at all. How do you achieve this for AC Tool? We have waitForOsgiEventsQuietInSec on ui.apps if this is what you are looking for.
You should be able to use a combination of a) package dependencies (enforcing the right order of sub package installations) and b) https://sling.apache.org/documentation/bundles/installer-provider-installhook.html to synchronously deploy the necessary bundles with the package
Then it should work when you set the package dependencies.
Package dependencies are not enough as the contained bundles are being picked up asynchronously by the JCR Installer Provider. If you would provide an AECU package leveraging https://sling.apache.org/documentation/bundles/installer-provider-installhook.html which contains all relevant bundles (i.e. its own as well as the one from the Groovyconsole) it should be possible though.
We have
<installPathRegex>/apps/valtech/aecu/(config|install)/.*</installPathRegex>
Does it help if you install AECU bundle that contains Groovy Console?
We have
<installPathRegex>/apps/valtech/aecu/(config|install)/.*</installPathRegex>
That is nice, but won't help for Groovyconsole itself. I think right now using the hook is quite useless as the downstream dependency is not deployed synchronously!
Does it help if you install AECU bundle that contains Groovy Console?
No, as the problem is the bundle from the Groovyconsole which is started too late.
I think what would be good is to repackage the Groovy Console in a way that the bundle is synchronously deployed.
I can check this after my vacation. Please leave a comment/PR if you have a solution. If it requires work on GroovyConsole side then it makes sense to file a PR there. They are quite constructive.
Added dependency on Groovy Console. Repackaging the Groovy Console is no option for the moment.
For the first time execution of packages relying on the install hook it is crucial that the bundle providing the hook is already running. How can I work with package dependencies and other means so that everything can be packaged together in one big container package:
Could you provide an example for that?