Hi, On Thu, Jul 31, 2008 at 8:27 AM, janandith jayawardena <[EMAIL PROTECTED]> wrote: > ...Instead of using ROOT.json like in webloader ui sample what other methods > are available to create a resource automatically when loading to sling > either using mvn -P autoInstallBundle or using launch pad webapp...
The content loading mechanism is implemented in the org.apache.sling.jcr.contentloader.internal package, if you look at that source code you'll see that it processes json, xml and zip files with special ContentReader objects, that for example use the json to specify nodes and properties as done by that ROOT.json. Other files are loaded as is by the content loader, that's what you also see in the webloader UI module where scripts found under src/main/resources/initial-content are loaded as is in the repository. That happens due to the <Sling-Initial-Content>initial-content</Sling-Initial-Content> statement in that module's pom.xml, which conceptually means "load content from src/main/resources/initial-content". json files are currently the most common way of loading arbitrary nodes and properties when a bundle is loaded, and they work fine. -Bertrand
