adobe / aem-project-archetype

Maven template to create best-practice websites on AEM.
https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetype/overview.html
Apache License 2.0
547 stars 426 forks source link

core bundle fails to start in latest version or archetype(32) on AEMasCS SDK #853

Open cqsapient opened 2 years ago

cqsapient commented 2 years ago

The core bundle generated fails to start after installation with error -

org.apache.sling.api.request,version=[2.5,3) -- Cannot be resolved org.apache.sling.api.resource,version=[2.13,3) -- Cannot be resolved

Its expecting [2.5,3) and [2.13,3) versions of the dependencies which are not present in

2021.10.5977.20211021T153528Z-211000

version of AEM SDK

cqsapient commented 2 years ago

this was resolved by adding SDK version in the parameter. Issue is that when you use archetype version 32 with old SDK without specifying SDK version; it takes latest SDK version for compiling code against latest SDK version jar and the libraries version is also updated to latest. this should be mentioned in the docs to specify SDK version when using latest version of archetype.

dfparker2002 commented 2 years ago

Please post a sample solution; was this part of your pom or maven build command? Which sdk version "works?"

FYI - core/pom.xml import org.apache.sling.api;version="[2.3,3)",* worked for me

godanny86 commented 2 years ago

There should be a line in the parent pom.xml like <aem.sdk.api>2022.1.6198.20220113T173638Z-211100</aem.sdk.api>. Ideally this is the same version as the AEM CS version your deploying to but at a minimum needs to be less. If your local AEM SDK is quite old you could run into this issue but should just download the latest from the software distribution portal. What is the reason for using an old version of the SDK?

tauba commented 2 years ago

Archetype 35 and this is still happening. What is the solution for this?

My parent POM has 2022.2.6276.20220205T222203Z-220100</aem.sdk.api>

RashidJorvee commented 2 years ago

I am seeing this error in AEM 6.5.13. In this case, what I should do?

PandianRamkumar commented 1 year ago

Please check my comment here and the corresponding post. I hope this helps.