Expand my Community achievements bar.

SOLVED

build issues - Bundle x is importing package(s) Package com.day.cq.wcm.api;version=[1.30,1.31)

Avatar

Level 2

Since 8/14 we've been having build issues even though there were no code changes on our side. When aem sdk 2024.8 was released now all older versions of the aem sdk no longer work. Whenever we run on any older aem sdk versions (including the version that production is currently running - 2024.7), we get the following error:

[ERROR] The analyser found the following errors for author and publish : 
[ERROR] [api-regions-exportsimports] com.graco.aem.library:graco-aem-library-api:0.0.1-SNAPSHOT: Bundle graco-aem-library-api:0.0.1-SNAPSHOT is importing package(s) Package com.day.cq.wcm.api;version=[1.30,1.31) in start level 20 but no visible bundle is exporting these for that start level in the required version range. (com.graco.aem:graco.all:0.0.1-SNAPSHOT|com.graco.aem.library:graco-aem-library:0.0.1-SNAPSHOT)

 and then the build fails.

Any advice?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 2

I ended up finding a workaround solution by putting the following in my pom.xml on the maven-bundle-plugin configuration:

 

<Import-Package>*;resolution:=optional</Import-Package>

 

This issue started when the aem-sdk-api release of 2024.8 came out. Somehow every version except for 2024.8 broke when 2024.8 was released if I didn't put resolution:=optional.

Curious if anyone else ran into this issue.

View solution in original post

3 Replies

Avatar

Community Advisor

Hi,

The error is caused because the Analyzer Maven Plugin is not finding all the dependencies your bundle will use, specifically: com.day.cq.wcm.api;version=[1.30,1.31). You can read more about this issue here: Adobe Experience Manager Core Components - Build Analyzer Maven Plugin.

 

The missing dependency is part of the SDK or the uber-jar, depending on whether you use AEMaaCS or AEM on-premise. To resolve this issue, ensure you use compatible versions of your code, so use the latest SDK that should fix your build issue

 

Hope this helps.

 



Esteban Bustamante

Avatar

Correct answer by
Level 2

I ended up finding a workaround solution by putting the following in my pom.xml on the maven-bundle-plugin configuration:

 

<Import-Package>*;resolution:=optional</Import-Package>

 

This issue started when the aem-sdk-api release of 2024.8 came out. Somehow every version except for 2024.8 broke when 2024.8 was released if I didn't put resolution:=optional.

Curious if anyone else ran into this issue.

Avatar

Level 1

I see this issue, I used latest archetype which has august release but my rde is old. I need to downgrade my project to fix this issue