Hi,

Vidar Ramdal wrote:
> The maven-sling-plugin has the very useful feature mountByFS, which
> automatically sets up FsResourceProviders for the initial-content in
> the bundle.
> This is great for development, as you can work directly on the files
> in the bundle, without having to re-deploy the bundle for each change.
> 
> However, the mountByFS feature relies on the Sling-Initial-Content
> header to decide which paths should be mapped. This crashes with the
> Sling Content Loader bundle, which also looks for that header. So, if
> the Content Loader bundle is active when you deploy a bundle with
> mountByFS, you'll end up with both FsResourceProviders AND initial
> content in the repository. This defies the purpose of mountByFS, and
> usually also leads to some unexpected behavior in resource resolution.
actually the initial idea of this feature was to reduce turnaround times
during development. Instead of copying changed scripts into the
repository (either by deploying the bundle and then using initial
content) or by using a copy through webdav, the scripts get directly
mounted into the resource tree.

My usual development environment uses this feature together with initial
content headers and so far I never experienced a problem - it is true
that the content is also installed into the repository but the resources
mounted through the fs provider take precedence - at least they do it in
my case :)

> 
> So how about letting maven-sling-plugin support another config element
> in addition to Sling-Initial-Content, say, Sling-Mount-File-Resources.
> That way, the Content Loader bundle should not interfere when the
> mountByFS bundle is deployed.
I'm not against adding an additonal configuration element for this
purpose. I started with the initial content header as this was already
available and used :)

Now, I think we should a) add the additional config element and b) see
which problems you have when the initial content header is used. Maybe
we can fix them as well.

Regards
Carsten
-- 
Carsten Ziegeler
[email protected]

Reply via email to