I'm having a slight problem with incorporating the appropriate maven dependencies into my project for sling models.
When I deploy my bundle, I get the following import that can't be resolved:
org.apache.sling.models.annotations,version=[1.1,2) -- Cannot be resolved
I believe I have included this with the following dependencies:
<dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.models.api</artifactId> </dependency> <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.models.impl</artifactId> </dependency>
I tried using:
<Embed-Transitive>true</Embed-Transitive> <Import-Package>*</Import-Package>
in my bundle compile instructions, but this has just resulted in a ton of other dependencies not being resolved.
Surely I've gone down the garden path here somewhere. Any help would be greatly appreciated.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
It appears that your code is dependening upon a newer version of the Sling Models API than is available in your AEM instance. Your two options are to depend upon an older version of the API or to deploy a newer version of Sling Models into your instance.
Two additional comments:
Regards,
Justin
Views
Replies
Total Likes
Hi,
It appears that your code is dependening upon a newer version of the Sling Models API than is available in your AEM instance. Your two options are to depend upon an older version of the API or to deploy a newer version of Sling Models into your instance.
Two additional comments:
Regards,
Justin
Views
Replies
Total Likes
Hi Justin,
Thanks, that's correct. I'll figure out an appropriate way to get the jar into the instance.
Views
Replies
Total Likes
You might want to use the convienence content packages we have on GitHub. I typically keep these at most a day or two behind the actual Sling releases. Here's the latest one: https://github.com/Adobe-Consulting-Services/com.adobe.acs.bundles.sling-models/releases/tag/com.ado...
Views
Replies
Total Likes
Views
Likes
Replies