hello peter.

that definitely looks like a bug for me and should be changed to @ConsumerType. 
i'm not in the details of that project and are not sure if more of the related 
interfaces should be updated as well. can you create a JIRA ticket [1] to 
further track this issue? additionally, you could provide a PR if possible 
linked to that ticket.

stefan

[1] https://issues.apache.org/jira/projects/SLING/


> -----Original Message-----
> From: Peter Tos <[email protected]>
> Sent: Tuesday, September 17, 2024 3:08 AM
> To: [email protected]
> Subject: Apache Sling Sitemap Extension Issue
> 
> Hi Sling Community,
> 
> I'm currently working on an AEM implementation where we are using the
> Apache Sling Sitemap module. We are creating a custom sitemap to introduce
> custom metadata for their Coveo search engine to index.
> 
> I implemented a Custom Sling Sitemap Extension following the extension
> pattern in the documentation, where we need to extend the marker
> org.apache.sling.sitemap.builder.Extension interface with our custom
> extension data, implement our custom extension interface and register the
> Extension Instance, following the AlternateLangugaeExtension example. This
> is working as expected and the sitemap is generating correctly.
> 
> What I have noticed is that org.apache.sling.sitemap.builder.Extension is
> annotated with @ProviderType and no classes outside of the bundle should
> extend or implement a class annotated with @ProviderType. For our AEM
> implementation, this is failing the code quality scan.
> 
> With the Sitemap Extension approach requiring the consumer to extend the
> Extension interface, is it possible to (or should we) remove @ProviderType
> annotation from the interface?
> 
> Thanks,
> Pete

Reply via email to