Skip to main content
sams16001423
Level 2
Feb 7, 2025 7:03 AM UTC
Solved

com.adobe.cq.commerce.core.components.models compilation error 3.8.1

Hi , I have generated wknds project archetype mentioned as per the wknds project setup doc and project got created, while building the project I'm seeing below error for ui.apps

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project aem-guides-wknd.ui.apps: Compilation failure
[ERROR] /C:/Users/Desktop/AEM/wknd_6.5/aem-guides-wknd/ui.apps/target/generated-sources/htl/org/apache/sling/scripting/sightly/apps/wknd/components/commerce/logo/logo__002e__html.java:[46,95] package com.adobe.cq.commerce.core.components.models.header does not exist

I'm using Maven : apache-maven-3.9.0-bin and Java : 11.0.15.1. please let me know if anyone the root cause for this issue.

Thanks in advance.

 

PRATHYUSHA_VP
PRATHYUSHA_VPAccepted solution
Community Advisor
Feb 7, 2025 8:22 AM UTC

Hi @sams16001423 

 

Can you run the given maven command in command prompt terminal with administrator rights. It worked as expected and build is success

 

->  To start command prompt with admin rights, right click on cmd and click on run as administrator

 

Hope this helps

Prathyusha - AEM Developer

4 replies

PRATHYUSHA_VP
Community Advisor
Community Advisor
Feb 7, 2025 7:30 AM UTC

Hi @sams16001423 

 

Can you check if core components dependency is updated in respective pom.xml and whether the version is compatible or not -

 

If you're using AEMasCS, core component package will comes with SDK

 

<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.core</artifactId>
<version>${core.wcm.components.version}</version>
</dependency>
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.content</artifactId>
<type>zip</type>
<version>${core.wcm.components.version}</version>
</dependency>
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.config</artifactId>
<type>zip</type>
<version>${core.wcm.components.version}</version>
</dependency>

 Hope this helps

Translate
Prathyusha - AEM Developer
sams16001423
Level 2
Feb 7, 2025 8:14 AM UTC

Hi @PRATHYUSHA_VP I have used below command to generate project which is not AEMasCS

mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=39 -D appTitle="WKND Sites Project" -D appId="wknd" -D groupId="com.adobe.aem.guides" -D artifactId="aem-guides-wknd" -D package="com.adobe.aem.guides.wknd" -D version="0.0.1-SNAPSHOT" -D aemVersion="6.5.20.0" 

 

I have added below dependency in ui.apps pom.xml file

 <dependency>
            <groupId>com.adobe.cq</groupId>
            <artifactId>core.wcm.components.core</artifactId>
<version>${core.wcm.components.version}</version>
        </dependency>
 
        <dependency>
            <groupId>com.adobe.cq</groupId>
            <artifactId>core.wcm.components.content</artifactId>
            <type>zip</type>
<version>${core.wcm.components.version}</version>
        </dependency>
        <dependency>
            <groupId>com.adobe.cq</groupId>
            <artifactId>core.wcm.components.config</artifactId>
            <type>zip</type>
<version>${core.wcm.components.version}</version>
        </dependency>

 

Still I see same error as below

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project aem-guides-wknd.ui.apps: Compilation failure
[ERROR] /C:/Users/Desktop/xxxxxxxx/aem-guides-wknd/ui.apps/target/generated-sources/htl/org/apache/sling/scripting/sightly/apps/wknd/components/commerce/logo/logo__002e__html.java:[46,95] package com.adobe.cq.commerce.core.components.models.header does not exist

Translate
PRATHYUSHA_VP
Community Advisor
PRATHYUSHA_VPCommunity AdvisorAccepted solution
Community Advisor
Feb 7, 2025 8:22 AM UTC

Hi @sams16001423 

 

Can you run the given maven command in command prompt terminal with administrator rights. It worked as expected and build is success

 

->  To start command prompt with admin rights, right click on cmd and click on run as administrator

 

Hope this helps

Translate
Prathyusha - AEM Developer
kautuk_sahni
Level 9
Feb 18, 2025 9:14 AM UTC

@sams16001423 Did you find the suggestion helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!

Translate
Kautuk Sahni