Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Import of com.adobe.cq.wcm.core.components.models is looking for wrong version

Avatar

Level 2

Hello all,

 

I'm currently working on an AEM as a Cloud Service project w/ multiple child sites in the code base (see very basic structure below). We use a global package to share common code between the sites. Unfortunately in the web console bundle list I'm seeing that the core bundle for site1 is 'Installed' rather than 'Active' due a missing dependency -- full message as follows: 

com.adobe.cq.wcm.core.components.models,version=[12.26,13) -- Cannot be resolved

 

When I dig into that bundle, I can see it's being exported from com.adobe.cq.core.wcm.components.core  (as intended) but the version is 12.25.

 

core-components-dep.PNG

My global.core package has no problem using this bundle, and both pom.xml files for global and site1 have the below code where the version is set to 2.19.0 (odd in and of itself as the version is clearly 2.20.8 in depfinder... so maybe this a piece of the puzzle I'm missing)

 

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

 

I'm wondering what is causing my site1.core bundle to look for that specific version of com.adobe.cq.wcm.core.components.models... does anyone have any suggestions as to where I should look? Could it be I'm importing a component in site1.core that is only defined in version 12.26 - 13 (fwiw I was hard pressed to find specific documentation on com.adobe.cq.wcm.core.components.models version 12.26+) ? Or should I take a deeper dive into my pom files to try and reconcile some dep stuff? I'm a little lost as to where the version is defined (in code) for com.adobe.cq.wcm.core.components.models. Maybe I should look into upgrading my core components? Any help is greatly appreciated!

 

Basic Code Structure

 

-site1

-site2

-dispatcher

-global

-pom.xml

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @user00928 ,

 

with AEMaaCS, the core component bundle comes along with the SDK. I mean, whenever you upgrade your SDK, the bundle comes along with the latest version available.

I would recommend you remove the dependency from your POM file if you wish to refer to the latest version each time. Else, make sure you use the same SDK version and desired core components version through your POM dependencies.

The bundle is in an active state because of the redundancy of the same bundle being deployed twice(one through SDK and one through your project).

Thank you,
Sravan

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @user00928 ,

 

with AEMaaCS, the core component bundle comes along with the SDK. I mean, whenever you upgrade your SDK, the bundle comes along with the latest version available.

I would recommend you remove the dependency from your POM file if you wish to refer to the latest version each time. Else, make sure you use the same SDK version and desired core components version through your POM dependencies.

The bundle is in an active state because of the redundancy of the same bundle being deployed twice(one through SDK and one through your project).

Thank you,
Sravan