Using eclipse AEM plugin with AEM 5.6.1 have sling API version mismatch issue.
Hi,
When creating new project using AEM plugin ( http://eclipse.adobe.com/aem/dev-tools/) with AEM 5.6.1 sever , I am getting below error :
Publishing failed Failed installing bundle : Unable to install/update bundle from dir E:\test\ws\sample\core\target\classes : Unresolved constraint in bundle com.sample.core [309]: Unable to resolve 309.0: missing requirement [309.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.api)(version>=2.3.0)(!(version>=3.0.0))) Unable to install/update bundle from dir E:\test\ws\sample\core\target\classes : Unresolved constraint in bundle com.sample.core [309]: Unable to resolve 309.0: missing requirement [309.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.api)(version>=2.3.0)(!(version>=3.0.0))) Failed publishing path=/apps/sample/tests, result=JcrResult[ success:false, exception: org.apache.sling.ide.transport.RepositoryException - javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {}dependencies] Failed publishing path=/content/sample, result=JcrResult[ success:false, exception: org.apache.sling.ide.transport.RepositoryException - javax.jcr.nodetype.ConstraintViolationException: no matching child node definition found for {http://www.jcp.org/jcr/1.0}content]It seems there is mismatch between Sling API version available in AEM 5.6.1 and version mentioned in pom.xml of generated project using plugin :
Below are maven co-ordinates that I get from felix console dependency finder ( http://localhost:4502/system/console/depfinder) of AEM 5.6.1 :
<dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.api</artifactId> <version>2.4.3-R1488084</version> <scope>provided</scope> </dependency>
And project pom.xml has below entry :
<dependency> <groupId>com.adobe.aem</groupId> <artifactId>aem-api</artifactId> <version>6.0.0.1</version> <scope>provided</scope> </dependency>
aem-api artifact jar has various important API class files eg: JCR,sling, granite, sightly.
So it seems sling version inside aem-api artifact is not matching with sling api version available in 5.6.1
Appreciate if any one can help to solve this issue !
Thanks,
Faizaan Shaikh
