Common Config folder not activating osgi component



Hi All, 


We have following structure 


/apps/*/config  -  (sling:folder)

/apps/*/   -  (nt:folder)  

/apps/*/   -  (nt:folder)  


We are running aem with author runmodes [dev, author]. 


Now when we deploy these folders only configs from activate the osgi component. Even if we manually change configs in /apps/*/config folder it does not activate my component with new config. 


However, if we change configs under it does reactivate my component with the configs under the folder. 


Documentation says config is applicable to all run modes. So just wondering if this behavior is correct. 


Further, do we need have all the folders as sling:folder rather than nt:folder. What is the purpose of declaring a folder as sling:folder ? 




Accepted Solutions (1)

Accepted Solutions (1)



Hello @Adilmo,

The behavior you've described is expected, since if there are several config folders with multiple run modes combined, the most specific one is applied. In your case has a priority over just config or More details about config resolution order can be found here (please see the "Resolution of multiple Run Modes" section).

The documentation suggests using sling:folder for managing OSGI configs. Differences between sling:folder and nt:folder (please see the link for reference):

nt:folder - This node type represents a plain file system folder (it can have nt:folder and nt:file children and only a few restricted meta data properties) // so quite restricted in terms of properties and nodes.

sling:folder - This node type is basically nt:folder + nt:unstructured in one, i.e. it can be used inside other nt:folders. // should be used more often.


Answers (0)