[jira] [Commented] (SLING-11773) ResourceTypeHierarchyBasedResourcePicker not working anymore

2023-02-13 Thread Radu Cotescu (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17688346#comment-17688346
 ] 

Radu Cotescu commented on SLING-11773:
--

There's an additional issue though. With the migration, the components are 
registered only based on the configuration properties. The registration 
properties are ignored. See SLING-11774. I already have a fix that I'm testing, 
haven't committed it yet.

> ResourceTypeHierarchyBasedResourcePicker not working anymore
> 
>
> Key: SLING-11773
> URL: https://issues.apache.org/jira/browse/SLING-11773
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Resource Merger 1.4.0
>Reporter: Sagar Miglani
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> In SLING-10168, SCR annotations were replaced by OSGi and configurations of 
> {{ResourceTypeHierarchyBasedResourcePicker}} have been designated to an inner 
> Configuration class, which are not getting bind properly without 
> {{@Activate}} Method.
> And hence {{ResourceTypeHierarchyBasedResourcePicker}} does not seem to be 
> registered by
> {{MergedResourcePickerWhiteboard}} [0].
> Compared generated XMLs:
> *With {{Activate}} Method injection:*
> {code:xml}
> 
> http://www.osgi.org/xmlns/scr/v1.3.0; 
> name="org.apache.sling.resourcemerger.picker.overriding" 
> configuration-policy="require" activate="activate">
>   
>   
>   
>   
>      interface="org.apache.sling.resourcemerger.spi.MergedResourcePicker2"/>
>   
>    class="org.apache.sling.resourcemerger.impl.picker.ResourceTypeHierarchyBasedResourcePicker"/>
> 
> {code}
> *Without {{@Activate}} method injection:*
> {code:xml}
> 
> http://www.osgi.org/xmlns/scr/v1.3.0; 
> name="org.apache.sling.resourcemerger.picker.overriding" 
> configuration-policy="require">
>   
>   
>  interface="org.apache.sling.resourcemerger.spi.MergedResourcePicker2"/>
>   
>class="org.apache.sling.resourcemerger.impl.picker.ResourceTypeHierarchyBasedResourcePicker"/>
> 
> {code}
> [0]: 
> https://github.com/apache/sling-org-apache-sling-resourcemerger/blob/master/src/main/java/org/apache/sling/resourcemerger/impl/MergedResourcePickerWhiteboard.java#L87



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (SLING-11773) ResourceTypeHierarchyBasedResourcePicker not working anymore

2023-02-13 Thread Konrad Windszus (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17687971#comment-17687971
 ] 

Konrad Windszus commented on SLING-11773:
-

I was assuming the {{@Designate}} annotation clearly connects them metatype 
with the DS component 
([https://github.com/apache/sling-org-apache-sling-resourcemerger/blob/186043d052c4a25553cde99d3b55e630bc6bc062/src/main/java/org/apache/sling/resourcemerger/impl/picker/ResourceTypeHierarchyBasedResourcePicker.java#L39).]
 But you are right, according to 
[https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.component.html#service.component-ordering.generated.properties:]

Only
{quote}Properties defined through component property types used as the type of 
an activation object.
{quote}
or
{quote}Properties defined through component property types annotating the 
component implementation class.
{quote}
end up as component properties.

I would prefer the latter in this case instead of introducing the empty 
activate method.

> ResourceTypeHierarchyBasedResourcePicker not working anymore
> 
>
> Key: SLING-11773
> URL: https://issues.apache.org/jira/browse/SLING-11773
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Resource Merger 1.4.0
>Reporter: Sagar Miglani
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In SLING-10168, SCR annotations were replaced by OSGi and configurations of 
> {{ResourceTypeHierarchyBasedResourcePicker}} have been designated to an inner 
> Configuration class, which are not getting bind properly without 
> {{@Activate}} Method.
> And hence {{ResourceTypeHierarchyBasedResourcePicker}} does not seem to be 
> registered by
> {{MergedResourcePickerWhiteboard}} [0].
> Compared generated XMLs:
> *With {{Activate}} Method injection:*
> {code:xml}
> 
> http://www.osgi.org/xmlns/scr/v1.3.0; 
> name="org.apache.sling.resourcemerger.picker.overriding" 
> configuration-policy="require" activate="activate">
>   
>   
>   
>   
>      interface="org.apache.sling.resourcemerger.spi.MergedResourcePicker2"/>
>   
>    class="org.apache.sling.resourcemerger.impl.picker.ResourceTypeHierarchyBasedResourcePicker"/>
> 
> {code}
> *Without {{@Activate}} method injection:*
> {code:xml}
> 
> http://www.osgi.org/xmlns/scr/v1.3.0; 
> name="org.apache.sling.resourcemerger.picker.overriding" 
> configuration-policy="require">
>   
>   
>  interface="org.apache.sling.resourcemerger.spi.MergedResourcePicker2"/>
>   
>class="org.apache.sling.resourcemerger.impl.picker.ResourceTypeHierarchyBasedResourcePicker"/>
> 
> {code}
> [0]: 
> https://github.com/apache/sling-org-apache-sling-resourcemerger/blob/master/src/main/java/org/apache/sling/resourcemerger/impl/MergedResourcePickerWhiteboard.java#L87



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (SLING-11773) ResourceTypeHierarchyBasedResourcePicker not working anymore

2023-02-13 Thread Carsten Ziegeler (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17687945#comment-17687945
 ] 

Carsten Ziegeler commented on SLING-11773:
--

[~kwin] I don't think this is a bnd bug. There is no instruction (annotation) 
in the class instructing bnd to generate properties. Only the usage in a 
lifecycle method does this. The used annotations are purely for metatype.

> ResourceTypeHierarchyBasedResourcePicker not working anymore
> 
>
> Key: SLING-11773
> URL: https://issues.apache.org/jira/browse/SLING-11773
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Resource Merger 1.4.0
>Reporter: Sagar Miglani
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In SLING-10168, SCR annotations were replaced by OSGi and configurations of 
> {{ResourceTypeHierarchyBasedResourcePicker}} have been designated to an inner 
> Configuration class, which are not getting bind properly without 
> {{@Activate}} Method.
> And hence {{ResourceTypeHierarchyBasedResourcePicker}} does not seem to be 
> registered by
> {{MergedResourcePickerWhiteboard}} [0].
> Compared generated XMLs:
> *With {{Activate}} Method injection:*
> {code:xml}
> 
> http://www.osgi.org/xmlns/scr/v1.3.0; 
> name="org.apache.sling.resourcemerger.picker.overriding" 
> configuration-policy="require" activate="activate">
>   
>   
>   
>   
>      interface="org.apache.sling.resourcemerger.spi.MergedResourcePicker2"/>
>   
>    class="org.apache.sling.resourcemerger.impl.picker.ResourceTypeHierarchyBasedResourcePicker"/>
> 
> {code}
> *Without {{@Activate}} method injection:*
> {code:xml}
> 
> http://www.osgi.org/xmlns/scr/v1.3.0; 
> name="org.apache.sling.resourcemerger.picker.overriding" 
> configuration-policy="require">
>   
>   
>  interface="org.apache.sling.resourcemerger.spi.MergedResourcePicker2"/>
>   
>class="org.apache.sling.resourcemerger.impl.picker.ResourceTypeHierarchyBasedResourcePicker"/>
> 
> {code}
> [0]: 
> https://github.com/apache/sling-org-apache-sling-resourcemerger/blob/master/src/main/java/org/apache/sling/resourcemerger/impl/MergedResourcePickerWhiteboard.java#L87



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (SLING-11773) ResourceTypeHierarchyBasedResourcePicker not working anymore

2023-02-13 Thread Konrad Windszus (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17687911#comment-17687911
 ] 

Konrad Windszus commented on SLING-11773:
-

That sounds like a bug in the underlying bnd library. [~sagarmiglani] Can you 
try upgrading to the latest parent instead to see if this fixes it? Otherwise 
would be good to report a bug at https://github.com/bndtools/bnd/issues/.

> ResourceTypeHierarchyBasedResourcePicker not working anymore
> 
>
> Key: SLING-11773
> URL: https://issues.apache.org/jira/browse/SLING-11773
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Resource Merger 1.4.0
>Reporter: Sagar Miglani
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In SLING-10168, SCR annotations were replaced by OSGi and configurations of 
> {{ResourceTypeHierarchyBasedResourcePicker}} have been designated to an inner 
> Configuration class, which are not getting bind properly without 
> {{@Activate}} Method.
> And hence {{ResourceTypeHierarchyBasedResourcePicker}} does not seem to be 
> registered by
> {{MergedResourcePickerWhiteboard}} [0].
> Compared generated XMLs:
> *With {{Activate}} Method injection:*
> {code:xml}
> 
> http://www.osgi.org/xmlns/scr/v1.3.0; 
> name="org.apache.sling.resourcemerger.picker.overriding" 
> configuration-policy="require" activate="activate">
>   
>   
>   
>   
>      interface="org.apache.sling.resourcemerger.spi.MergedResourcePicker2"/>
>   
>    class="org.apache.sling.resourcemerger.impl.picker.ResourceTypeHierarchyBasedResourcePicker"/>
> 
> {code}
> *Without {{@Activate}} method injection:*
> {code:xml}
> 
> http://www.osgi.org/xmlns/scr/v1.3.0; 
> name="org.apache.sling.resourcemerger.picker.overriding" 
> configuration-policy="require">
>   
>   
>  interface="org.apache.sling.resourcemerger.spi.MergedResourcePicker2"/>
>   
>class="org.apache.sling.resourcemerger.impl.picker.ResourceTypeHierarchyBasedResourcePicker"/>
> 
> {code}
> [0]: 
> https://github.com/apache/sling-org-apache-sling-resourcemerger/blob/master/src/main/java/org/apache/sling/resourcemerger/impl/MergedResourcePickerWhiteboard.java#L87



--
This message was sent by Atlassian Jira
(v8.20.10#820010)