Pages

Thursday, December 19, 2013

CQ5/AEM How do I find out exactly which maven dependency I need?

The Problem

You are writing a customization in Java for CQ5/AEM, but the class you need is not currently included in the project, but it is available in CQ5.

You may know what dependency you need, but are unsure as to the version. What is the best way to find the right dependency to include in CQ5?

The Solution

Go to:
http://localhost:4502/system/console/depfinder



This is the package dependency lookup service. If you type in the package/class you need in the field, and click on Find, you will get the dependency you need to include.

Just copy and paste the dependency into your pom file.