build issues - Bundle x is importing package(s) Package com.day.cq.wcm.api;version=[1.30,1.31) | Community
Skip to main content
Level 2
August 16, 2024
Solved

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

  • August 16, 2024
  • 3 replies
  • 1835 views

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?

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 tim_d_grimes

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.

3 replies

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
August 16, 2024

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
tim_d_grimesAuthorAccepted solution
Level 2
August 16, 2024

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.

September 11, 2024

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