Maven error when when using AEM API dependency
Problem
In Maven when using a aem-api (version 6.0.0.1 at the moment of writing) dependency with some never API dependencies (i.e Sling Models) I run into strange errors like - WCMIO-54Getting issue details... STATUS
Solution
Dependency order matters here. Since aem-api is not a dependency with provided transient dependencies, but a simple collection of .jar files, make sure it is always coming AFTER the never API dependencies.
pom.xml
<dependencies> <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.models.api</artifactId> <version>1.1.0</version> <scope>provided</scope> </dependency> . . . <dependency> <groupid>com.adobe.aem</groupid> <artifactid>aem-api</artifactid> <version>6.0.0.1</version> <scope>provided</scope> </dependency> </dependencies>
Related articles