You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Konrad Windszus <ko...@gmx.de> on 2016/01/08 17:11:00 UTC

File Installer Provider

Hi,
according to https://sling.apache.org/documentation/bundles/file-installer-provider.html#runmode-support <https://sling.apache.org/documentation/bundles/file-installer-provider.html#runmode-support> the file installer supports run modes if within the watched folder there is a folder with a name specifying a run mode.
By looking at the code https://github.com/apache/sling/blob/trunk/installer/providers/file/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java#L146 <https://github.com/apache/sling/blob/trunk/installer/providers/file/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java#L146> to me it seems that this run mode handling is only active if the folder has the prefix “install.” This is not mentioned at all in the documentation.
Is this rather an oversight in the code or is the documentation just not clear enough in that regard?
I can update the documentation once it is clear to me, whether the code is behaving correctly in that regard.
Thanks,
Konrad

Re: File Installer Provider

Posted by Konrad Windszus <ko...@gmx.de>.
Thanks,
fixed the documentation in r1723756 and r1723757.

> On 08 Jan 2016, at 17:43, Carsten Ziegeler <cz...@apache.org> wrote:
> 
> Konrad Windszus wrote
>> Thanks for clarifying. I will update the doc accordingly. Is it possible to combine run mode with start level handling by putting e.g. a bundle within
>> <sling.fileinstall.dir>/install.dev1.a1/3/mybundle.jar?
> 
> Yes.
> 
>> If I understand the code correctly the run mode can only be set directly within a folder name directly below one of <sling.fileinstall.dir>s, right, while the start level handling is set on the direct parent folder of the artifact itself.
> 
> Yes, correct
> 
> Regards
> Carsten
> 
>> Thanks for a quick confirmation here as well.
>> Konrad
>> 
>> 
>>> On 08 Jan 2016, at 17:17, Carsten Ziegeler <cz...@apache.org> wrote:
>>> 
>>> Konrad Windszus wrote
>>>> Hi,
>>>> according to https://sling.apache.org/documentation/bundles/file-installer-provider.html#runmode-support <https://sling.apache.org/documentation/bundles/file-installer-provider.html#runmode-support> the file installer supports run modes if within the watched folder there is a folder with a name specifying a run mode.
>>>> By looking at the code https://github.com/apache/sling/blob/trunk/installer/providers/file/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java#L146 <https://github.com/apache/sling/blob/trunk/installer/providers/file/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java#L146> to me it seems that this run mode handling is only active if the folder has the prefix “install.” This is not mentioned at all in the documentation.
>>>> Is this rather an oversight in the code or is the documentation just not clear enough in that regard?
>>>> I can update the documentation once it is clear to me, whether the code is behaving correctly in that regard.
>>> 
>>> I think the docs are wrong :( According to SLING-4478 the folder name
>>> must start with that prefix.
>>> 
>>> Regards
>>> Carsten
>>> -- 
>>> Carsten Ziegeler
>>> Adobe Research Switzerland
>>> cziegeler@apache.org
>> 
>> 
> 
> 
> 
> -- 
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org


Re: File Installer Provider

Posted by Carsten Ziegeler <cz...@apache.org>.
Konrad Windszus wrote
> Thanks for clarifying. I will update the doc accordingly. Is it possible to combine run mode with start level handling by putting e.g. a bundle within
> <sling.fileinstall.dir>/install.dev1.a1/3/mybundle.jar?

Yes.

> If I understand the code correctly the run mode can only be set directly within a folder name directly below one of <sling.fileinstall.dir>s, right, while the start level handling is set on the direct parent folder of the artifact itself.

Yes, correct

Regards
Carsten

> Thanks for a quick confirmation here as well.
> Konrad
> 
> 
>> On 08 Jan 2016, at 17:17, Carsten Ziegeler <cz...@apache.org> wrote:
>>
>> Konrad Windszus wrote
>>> Hi,
>>> according to https://sling.apache.org/documentation/bundles/file-installer-provider.html#runmode-support <https://sling.apache.org/documentation/bundles/file-installer-provider.html#runmode-support> the file installer supports run modes if within the watched folder there is a folder with a name specifying a run mode.
>>> By looking at the code https://github.com/apache/sling/blob/trunk/installer/providers/file/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java#L146 <https://github.com/apache/sling/blob/trunk/installer/providers/file/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java#L146> to me it seems that this run mode handling is only active if the folder has the prefix “install.” This is not mentioned at all in the documentation.
>>> Is this rather an oversight in the code or is the documentation just not clear enough in that regard?
>>> I can update the documentation once it is clear to me, whether the code is behaving correctly in that regard.
>>
>> I think the docs are wrong :( According to SLING-4478 the folder name
>> must start with that prefix.
>>
>> Regards
>> Carsten
>> -- 
>> Carsten Ziegeler
>> Adobe Research Switzerland
>> cziegeler@apache.org
> 
> 


 
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: File Installer Provider

Posted by Konrad Windszus <ko...@gmx.de>.
Thanks for clarifying. I will update the doc accordingly. Is it possible to combine run mode with start level handling by putting e.g. a bundle within
<sling.fileinstall.dir>/install.dev1.a1/3/mybundle.jar?
If I understand the code correctly the run mode can only be set directly within a folder name directly below one of <sling.fileinstall.dir>s, right, while the start level handling is set on the direct parent folder of the artifact itself.
Thanks for a quick confirmation here as well.
Konrad


> On 08 Jan 2016, at 17:17, Carsten Ziegeler <cz...@apache.org> wrote:
> 
> Konrad Windszus wrote
>> Hi,
>> according to https://sling.apache.org/documentation/bundles/file-installer-provider.html#runmode-support <https://sling.apache.org/documentation/bundles/file-installer-provider.html#runmode-support> the file installer supports run modes if within the watched folder there is a folder with a name specifying a run mode.
>> By looking at the code https://github.com/apache/sling/blob/trunk/installer/providers/file/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java#L146 <https://github.com/apache/sling/blob/trunk/installer/providers/file/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java#L146> to me it seems that this run mode handling is only active if the folder has the prefix “install.” This is not mentioned at all in the documentation.
>> Is this rather an oversight in the code or is the documentation just not clear enough in that regard?
>> I can update the documentation once it is clear to me, whether the code is behaving correctly in that regard.
> 
> I think the docs are wrong :( According to SLING-4478 the folder name
> must start with that prefix.
> 
> Regards
> Carsten
> -- 
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org


Re: File Installer Provider

Posted by Carsten Ziegeler <cz...@apache.org>.
Konrad Windszus wrote
> Hi,
> according to https://sling.apache.org/documentation/bundles/file-installer-provider.html#runmode-support <https://sling.apache.org/documentation/bundles/file-installer-provider.html#runmode-support> the file installer supports run modes if within the watched folder there is a folder with a name specifying a run mode.
> By looking at the code https://github.com/apache/sling/blob/trunk/installer/providers/file/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java#L146 <https://github.com/apache/sling/blob/trunk/installer/providers/file/src/main/java/org/apache/sling/installer/provider/file/impl/Installer.java#L146> to me it seems that this run mode handling is only active if the folder has the prefix “install.” This is not mentioned at all in the documentation.
> Is this rather an oversight in the code or is the documentation just not clear enough in that regard?
> I can update the documentation once it is clear to me, whether the code is behaving correctly in that regard.

I think the docs are wrong :( According to SLING-4478 the folder name
must start with that prefix.

Regards
Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: File Installer Provider

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Friday 08 January 2016 17:11:00 Konrad Windszus wrote:
> Hi,

Hi,

> according to
> https://sling.apache.org/documentation/bundles/file-installer-provider.html
> #runmode-support
> <https://sling.apache.org/documentation/bundles/file-installer-provider.htm
> l#runmode-support> the file installer supports run modes if within the
> watched folder there is a folder with a name specifying a run mode. By
> looking at the code
> https://github.com/apache/sling/blob/trunk/installer/providers/file/src/mai
> n/java/org/apache/sling/installer/provider/file/impl/Installer.java#L146
> <https://github.com/apache/sling/blob/trunk/installer/providers/file/src/ma
> in/java/org/apache/sling/installer/provider/file/impl/Installer.java#L146>
> to me it seems that this run mode handling is only active if the folder has
> the prefix “install.” This is not mentioned at all in the documentation. Is
> this rather an oversight in the code or is the documentation just not clear
> enough in that regard? I can update the documentation once it is clear to
> me, whether the code is behaving correctly in that regard. Thanks,

somewhat related to this, but JCR Installer:

I would like to adjust the regexp pattern for folder names by adding config 
(and therefore matching the AEM default) and increase the folder depth from 4 
to 10. Is it ok for you?

Regards,
O.

> Konrad