A couple of things stand out:
1) nodes should not be an array
2) "jcr:primaryType": "sling.Folder" should use a colon on sling:Folder instead of period

The bundle will install fine even with bad content but the content importer will generally log out some errors. Do you see anything in the error.log?



On 4/21/2013 10:45 AM, Christian Eugster wrote:
Hi,

I developped a simple bundle in eclipse (3.8.2) using the archetype sling-initial-content. In the section

src/main/resources/SLING-INF/content

I added the following structure:

apps/thun/home/html.esp
apps/thun/header.esp
shared/css/screen.css
shared/images/thun.jpg
content/header.json
content/pages.json

The pages.json looks like following:

{
    "jcr:primaryType": "sling:Folder",

    "nodes":
    [
        {
            "name": "Home",
            "jcr:primaryType": "sling.Folder",
            "jcr:mixinTypes":
            [
                {
                    "sling:Resource"
                }
            ],
            "properties":
            {
                "title": "Home",
                "menu": "Home",
                "menu-tooltip": "Home",
                "sling:resourceType": "thun/home"
            }
        }
    ]
}

while header.json looks like this:

{
    "jcr:primaryType": "sling:Folder",
    "jcr:mixinTypes":
    [
        {
            "sling:Resource"
        }
    ],
    "properties":
    {
        "title": "Die Korrespondenz von Leo von Thun-Hohenstein",
"subtitle": "Ein Forschungsprojekt am Institut für Geschichtswissenschaften und Europäische Ethnologie an der Universität Innsbruck"
        "logo-alias": "Portrait Graf Leo von Thun-Hohenstein"
        "sling:resourceType": "thun/header"
    }
}

I deploy the bundle using:

mvn -P autoInstallBundle clean install -Dsling.url=http://localhost:8888/system/console

The bundle is deployed without any error messages and shown in the /system/console/bundle view but the resources are not added to the repository.

Am I missing something? Thank you for any hint!

Christian

Reply via email to