Hi Team,
In AEMaaCS We have git submodules to our main parent repo and have only read access to submodules.
There is one Osgiconfig called "com.day.cq.commons.impl.ExternalizerImpl.cfg" in both submodules as well as parent repo.
Then given module order in main pom.xml as below
:<module>parent all<module>
<module>parent core<module>
<module>parent ui.config<module>
<module>submodule<module>
Now the issue seems to be submodule osgiconfig always takes precendencein publish but we need our main parent osgiconfig value to be populated. In both repo, Osgiconfig is present in config.publish folder
please help what we need to do in this case.
Solved! Go to Solution.
Views
Replies
Total Likes
Yes, config.publish.dev folder should take precedences and populate parent config values.
Views
Replies
Total Likes
@Amsalek4 You can not have the same name for the OSGi in submodules and parent modules, try below solution
com.day.cq.commons.impl.ExternalizerImpl.cfg~submodule1.cfg.json
com.day.cq.commons.impl.ExternalizerImpl.cfg~sumodule2.cfg.json
com.day.cq.commons.impl.ExternalizerImpl.cfg~parentmodule.cfg.json
Views
Replies
Total Likes
I tried this. its not working. I hope this (com.day.cq.commons.impl.ExternalizerImpl.cfg~parentmodule.cfg.json) is for osgi factory configs right where we can create multiple configs for each scenario. but when we don't have option to create multiple in ootb config example AEMEnvironmentalindicator, ExternalizerImpl.
Views
Replies
Total Likes
If you did not check this answer by @arunpatidar, deeper paths (submodule) in the repository takes higher precedence. As OSGI configuration that has the most matching run modes is used, yow can update your parent osgiconfig folder like config.[environment].publish.
Order of Precedence:
Views
Replies
Total Likes
Thanks, In our case, how to populate our parent config values? do we need to change the folder name.?
current one : config.publish. if changing folder name to config.publish.dev would work?
Views
Replies
Total Likes
Yes, config.publish.dev folder should take precedences and populate parent config values.
Views
Replies
Total Likes
The Externalizer is not a factory service, that means there is just 1 configuration active. If you have 2 configurations in your repo, one will be active (either predictable or not), but that's probably not what you want.
First, you need to define what the actual value should be, and as next step you need to define, where you want to maintain it. Because if every team can decide on its own, what OSGI configuration they want and expect, you will likely end up with many problems.