maven dependency--> org.apache.sling.model | Community
Skip to main content
AdobeID24
Level 5
Sep 12, 2019 8:50 AM UTC
Solved

maven dependency--> org.apache.sling.model

amitsample - Corecom.amit.sample.core secreenshot

maven dependency I added

<!-- https://mvnrepository.com/artifact/org.apache.sling/org.apache.sling.models.api -->
<dependency>
  <groupId>org.apache.sling</groupId>
  <artifactId>org.apache.sling.models.api</artifactId>
  <version>1.2.2</version>
  <scope>provided</scope>
</dependency>

but after doing maven clean install and uploading the bundle in aem I am getting like above ---> can not be resolved ...

and even when i check sling model api bundle in my system/console it is showing lower version 1.1.0

why it has not been updated when i updated my maven dependncy version and built(amitsample - Corecom.amit.sample.core) it and uploaded in system/console ..

if I want to use 1.2.2 version of sling model api how we can do that ? ---adding maven dependcy is not helping ...

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
user05162Accepted solution
Employee
Sep 12, 2019 2:17 PM UTC

The only recommended way is to upgrade to the latest version of AEM. Installing a bundle that is meant to be for a higher version of AEM on a lower version is not a good idea. It might work but thats not a recommended way of doing things in AEM.

If you install the latest sling model bundle on AEM 6.0 from system/console, it will not resolve as it imports/exports packages based on the AEM version and not the individual bundle.

Every bundle in AEM has an export/import list which needs to be satisfied before a bundle can be resolved and Bundles are build keeping in mind the dependecies(Export/Import) for a particular version of AEM.

5 replies

AdobeID24
AdobeID24Author
Level 5
Sep 12, 2019 2:24 PM UTC

Thanks !!!

Translate
user05162Accepted solution
Employee
Sep 12, 2019 2:17 PM UTC

The only recommended way is to upgrade to the latest version of AEM. Installing a bundle that is meant to be for a higher version of AEM on a lower version is not a good idea. It might work but thats not a recommended way of doing things in AEM.

If you install the latest sling model bundle on AEM 6.0 from system/console, it will not resolve as it imports/exports packages based on the AEM version and not the individual bundle.

Every bundle in AEM has an export/import list which needs to be satisfied before a bundle can be resolved and Bundles are build keeping in mind the dependecies(Export/Import) for a particular version of AEM.

Translate
AdobeID24
AdobeID24Author
Level 5
Sep 12, 2019 12:23 PM UTC

Hey jaideep,

Thanks for the reply.... That is wat I am asking... I have to switch to higher version of aem like 6.3 or upper version to use these annotation.. If I want to use with lower version of aem like 6.0 is there any way?

Like specifically insatllimg bundle explicity in aem in system/console..... In aem 6.3 higher version we will get thses feature inbuit like sling model and sling exporter and all.. If I use these all features with lower version of aem.. There would be comaptibilty issue...?

Translate
Employee
Sep 12, 2019 11:15 AM UTC

You need to use the version of AEM that provides sling model API 1.2.2 OOTB. Example: AEM 6.3.3.5 has sling model API version 1.3.8

Translate
AdobeID24
AdobeID24Author
Level 5
Sep 12, 2019 8:55 AM UTC

Translate