Skip to main content
New Member
Jun 21, 2024 12:50 PM UTC
Solved

Error in extending Core Component in AEMaaCS

Hi,

 

I'm extending the Table of contents core component, to include an heading tag which will be skipped by the component during render. So, I overlayed the html and added my changes to the html. When I paste the changes to crx/de in local the results are working as expected. But when I try to build using maven, getting the below error

[ERROR] /Users/abc/projects/corp/ui.apps/target/generated-sources/htl/org/apache/sling/scripting/sightly/apps/corp/components/table__002d__of__002d__contents/table__002d__of__002d__contents__002e__html.java:[72,80] cannot find symbol
symbol: class TableOfContents
location: package com.adobe.cq.wcm.core.components.models

Since its an AEMaaCS, can i add the core dependency in pom.xml with provided scope?

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
DPrakashRaj
DPrakashRajAccepted solution
Community Advisor
Jun 21, 2024 2:08 PM UTC

I believe when you create a maven archetype for your cloud project it’s added by default.

<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.version</artifactId>
<version>${core.wcm.components.version}</version>

3 replies

arunpatidar
Community Advisor
Community Advisor
Jun 21, 2024 1:04 PM UTC
DPrakashRaj
Community Advisor
DPrakashRajCommunity AdvisorAccepted solution
Community Advisor
Jun 21, 2024 2:08 PM UTC

I believe when you create a maven archetype for your cloud project it’s added by default.

<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.version</artifactId>
<version>${core.wcm.components.version}</version>

Translate
kautuk_sahni
Level 9
Jun 25, 2024 12:35 PM UTC

@anand_kumar_t Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!  

Translate
Kautuk Sahni