Skip to main content
stiegjo
Level 2
Apr 11, 2024 3:25 PM UTC
Solved

Sling Model Exporter

I'm trying to annotate a class with@ModelExporter(Exporter.DEFAULT_EXPORT_LOCATIONS) to mark it as an exporter. However I get an error because the ModelExporter and Exporter classes or interfaces are not recognized. How can I add the dependency that contains this class to our pom.xml file? The ModelExporter annotation is not a part of the Apache Sling Models library.

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Anudeep_Garnepudi
Anudeep_GarnepudiAccepted solution
Community Advisor
Apr 11, 2024 4:06 PM UTC

@stiegjo 

You should use Model annotation. Refer the link on how to implement the Sling Model Exporter.

org.apache.sling.models.annotations.Model

 

Develop Sling Model Exporters in AEM | Adobe Experience Manager

AG

1 reply

Anudeep_Garnepudi
Community Advisor
Anudeep_GarnepudiCommunity AdvisorAccepted solution
Community Advisor
Apr 11, 2024 4:06 PM UTC

@stiegjo 

You should use Model annotation. Refer the link on how to implement the Sling Model Exporter.

org.apache.sling.models.annotations.Model

 

Develop Sling Model Exporters in AEM | Adobe Experience Manager

Translate
AG