Prior to CQ6 you have to add dependencies for each class you are using in your pom.xml, Way to find dependencies was (Maven org http://mvnrepository.com or using adobe central http://repo.adobe.com/nexus/content/groups/public through dependency finder HOST:PORT/system/console/depfinder). With CQ6 now all dependencies are provided through one artifactID.
Prerequisite: Maven, CQ Project Set Up
Include following line in your dependency management for your pom.xml (Depending upon project this could be at any location usually it is your Project parent pom)
<dependencyManagement>
<!-- All Your Third party dependency -->
<!-- AEM 6.0 -->
<!-- All AEM Dependencies for JSP compilation -->
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>aem-api</artifactId>
<version>6.0.0.1</version>
<scope>provided</scope>
</dependency>
<!-- All AEM 6.1 Dependency added to end of file -->
<dependency>
<groupId>com.adobe.cq.social</groupId>
<artifactId>cq-socialcommunities-api</artifactId>
<version>1.7.197</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.1.0</version>
<scope>provided</scope>
<classifier>obfuscated-apis</classifier>
</dependency>
</dependencyManagement>
Note that this version could change depending upon new releases of CQ, You can track them from http://repo.adobe.com/nexus/content/repositories/releases/com/adobe/aem/aem-api/
Some Trick: Note that above will include all AEM-API dependencies, other way to check what minimum dependency is needed is to create a multi module project using AEM plugin for eclipse more examplehttp://docs.adobe.com/content/docs/en/dev-tools/aem-eclipse.html .
You can also upload uber-jar with apis classifiers instead of obfuscate-apis classifier to your Nexus or dependency management system.
To upload this uber-jar to your nexus you can use something like,
mvn deploy:deploy-file -Durl=YOUR-REPO -Dfile=uber-jar-6.1.0-apis.jar -DartifactId=uber-jar -Dversion=6.1.0 -DgroupId=com.adobe.aem -Dclassifier=apis -Dpackaging=jar -DrepositoryId=YOUR-REPO-ID
Once you have uber-jar with apis classifier ready, You can use something like
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.1.0</version>
<classifier>apis</classifier>
<scope>provided</scope>
</dependency>
I see that minimum these are needed when you use this,
Prerequisite: Maven, CQ Project Set Up
Include following line in your dependency management for your pom.xml (Depending upon project this could be at any location usually it is your Project parent pom)
<dependencyManagement>
<!-- All Your Third party dependency -->
<!-- AEM 6.0 -->
<!-- All AEM Dependencies for JSP compilation -->
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>aem-api</artifactId>
<version>6.0.0.1</version>
<scope>provided</scope>
</dependency>
<!-- All AEM 6.1 Dependency added to end of file -->
<dependency>
<groupId>com.adobe.cq.social</groupId>
<artifactId>cq-socialcommunities-api</artifactId>
<version>1.7.197</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.1.0</version>
<scope>provided</scope>
<classifier>obfuscated-apis</classifier>
</dependency>
</dependencyManagement>
Note that this version could change depending upon new releases of CQ, You can track them from http://repo.adobe.com/nexus/content/repositories/releases/com/adobe/aem/aem-api/
Some Trick: Note that above will include all AEM-API dependencies, other way to check what minimum dependency is needed is to create a multi module project using AEM plugin for eclipse more examplehttp://docs.adobe.com/content/docs/en/dev-tools/aem-eclipse.html .
You can also upload uber-jar with apis classifiers instead of obfuscate-apis classifier to your Nexus or dependency management system.
To upload this uber-jar to your nexus you can use something like,
mvn deploy:deploy-file -Durl=YOUR-REPO -Dfile=uber-jar-6.1.0-apis.jar -DartifactId=uber-jar -Dversion=6.1.0 -DgroupId=com.adobe.aem -Dclassifier=apis -Dpackaging=jar -DrepositoryId=YOUR-REPO-ID
Once you have uber-jar with apis classifier ready, You can use something like
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.1.0</version>
<classifier>apis</classifier>
<scope>provided</scope>
</dependency>
I see that minimum these are needed when you use this,
No comments :
Post a Comment