CIF core project is not compiling locally | Community
Skip to main content
Level 7
August 13, 2024
Solved

CIF core project is not compiling locally

  • August 13, 2024
  • 3 replies
  • 919 views

Hello Team,

 

https://github.com/adobe/aem-core-cif-components

I have downloaded this CIF core project. Tried to run the command: mvn clean install -DskipTests its failing

same case with all forder. There also, project didnot compiled.

 

Can someone download the project and try compiling? For me, I wanted to modify the java files and wanted to build this core project only.

 

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by AMANATH_ULLAH

@mahesh_gunaje 

To make modifications to existing CIF core classes, you have to use sling model delegation pattern in your existing project

You should not modifying them in CIF core components project. Instead use them as dependency in your project and use sling model delegation to customize them as per your requirement

You can use Venia project as reference example. It shows an example of how an product teaser component is customized

https://github.com/adobe/aem-cif-guides-venia/blob/main/core/src/main/java/com/venia/core/models/commerce/MyProductTeaser.java

 

 

3 replies

ksh_ingole7
Community Advisor
Community Advisor
August 13, 2024

Hi @mahesh_gunaje 

Can you please share what error you are getting. 

Also you can try creating a project using the maven archtype. Add this property 

-D includeCommerce=y

 

Add CIF dependency 

<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>core-cif-components-apps</artifactId>
<type>zip</type>
<version>x.y.z</version>
</dependency>
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>core-cif-components-config</artifactId>
<type>zip</type>
<version>x.y.z</version>
</dependency>
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>core-cif-components-core</artifactId>
<version>x.y.z</version>
</dependency>
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>graphql-client</artifactId>
<version>x.y.z</version>
</dependency>
<dependency>
<groupId>com.adobe.commerce.cif</groupId>
<artifactId>magento-graphql</artifactId>
<version>x.y.z</version>
</dependency>

 

And try building the project. 

Level 7
August 13, 2024

Hi @ksh_ingole7 

 

Getting this error.

Note: If I create a new AEM project with archetype including: 

-D includeCommerce=y, In this case, can I modify CIF core classes? I mean: com.adobe.cq.commerce.core.components.internal.models.v1.product.ProductImpl.java I dont think so.

somen-sarkar
Community Advisor
Community Advisor
August 13, 2024

Hi @mahesh_gunaje ,
Looks like in windows command prompt, it has some issue while compiling/installing the same. Problem is a rm command in a script which is not available for windows command prompt. 

To overcome the same , use a bash shell and compile the same. Tools like cygwin also can be helpful here.


Thanks,

Somen

AMANATH_ULLAH
Community Advisor
AMANATH_ULLAHCommunity AdvisorAccepted solution
Community Advisor
August 13, 2024

@mahesh_gunaje 

To make modifications to existing CIF core classes, you have to use sling model delegation pattern in your existing project

You should not modifying them in CIF core components project. Instead use them as dependency in your project and use sling model delegation to customize them as per your requirement

You can use Venia project as reference example. It shows an example of how an product teaser component is customized

https://github.com/adobe/aem-cif-guides-venia/blob/main/core/src/main/java/com/venia/core/models/commerce/MyProductTeaser.java

 

 

Amanath Ullah