Hi,

I am working through some issues developing in NetBeans and deploying my 
Sling-based apps (CQ) via maven builds. My pom is fairly standard:

- maven-jspc-plugin
- maven-compiler-plugin (which defines a Sling-Initial-Content section)
- maven-sling-plugin (for deploying to sling)

Everything seems to be working reasonably well however I am having issues with 
the mountByFs functionality provided by Sling.

1) I installed Sling FS Resoure Provider bundle 1.0.2 (.9x-incubator came w my 
Sling install)
2) I setup my Sling-Initial-Content to map /apps/myapp/ and /content/myapp to  
my Netbeans project's SLING-INF folder. This folder in Netbeans only has JSON 
representations of the node (JSPs are stored under scripts).
3) When doing a full install in Netbeans (using the maven-sling-plugin) all my 
"initial-content" is pushed to the JCR and manifest as JCR Node (as expected 
and desired).

The problem comes in when I try to edit a JSON file representing a 
node/node-tree in Netbeans under my SLING-INF folder. I expect (and would like) 
these changes to be reflected in the node properties in the JCR.

I was hoping that the actual node's would be automatically updated in the JCR 
Content Manager/CRXDE Lite, etc. as I made changes in Netbeans to the JSON 
files (even if a refresh of the node/parent node was required). This does not 
seem to be the case. 

I can verify that the the mountByFs is actually working in some capacity; I 
created in Netbeans ../SLING-INF/initial-content/content/helloworld.html   
(without that node/file existing in the actual JCR) and was able to have Sling 
serve it to me (http://local:4502/content/helloworld.html)

I've also been able to verify that the Initial-Content of the nodes isn't 
masking the updates made in Netbeans.. To do this I created 
SLING-INF/initial-content/apps/test/hello.json  { "jcr:primarytype": 
"nt:unstructured", "jcr:title": "hello" } and deployed via Netbeans/Maven to 
CRX. I then verified the node was created with the correct properties. I also 
accessed the node via http://local:4502/apps/test/hello.tidy.json and received 
the expected result.

I then edited this file in Netbeans JSON file to contain "jcr:title" : "world" 
.. 

Hitting http://local:4502/apps/test/hello.tidy.json still told me jcr:title was 
"hello". 

I then deleted the hello node via CRXDE and refreshed ../hello.tidy.json  -- 
this time i got a 404. 

I then tried http://local:4502/apps/test/hello.json and the contents of the 
Netbeans modified file ("jcr:title" : "world") appeared (along w all the 
spacing, which leads me to believe this field is just being served as a file 
and not a node).

I've read through the Sling web site/docs several times over and can't figure 
out what I'm doing wrong or if this is just expected behavior.

Any help would be appreciated. 

I also have Apache Sling Initial Content Loader 2.1.2 active, if that matters, 
though it doesn't appear I can configure it. Are there any other bundles that I 
need to get this working?

Any help/thoughts are appreciated.

Thanks!

-- 
David Gonzalez
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


-- 
David Gonzalez
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

Reply via email to