Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

How to convert a CQ project to Maven

Avatar

Community Advisor

Hi

 

    I have a CQ project. I want it as a Maven project. I tried all the ways I could do, but it is giving me errors. Can anyone please guide me on how to convert a CQ project to Maven project through eclipse

 

Thanks

Veena

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

The links provided by Sham HC are probably the most useful, especially the first. We are relatively new to AEM/CQ. The recommendation from our consultancy partner is to use the CQ Maven Blueprints archetype (multi-module), that is covered in the first link. I will warn you though, the parent POM described by that article is not the one that is produced when using the archetype to generate the project. We also experienced a few issues with some of the dependencies (esp: taglib) and are currently working through them.

We maintain our own parent POM (which is heavily based on the one in the article - albeit many of the dependency versions are updated) which points to our internal corporate Maven repo which proxies to the CQ Blueprints repo and Adobe public (you need to set those up in eClipse - but I assume you already know how to do that). So when you run the maven command you just substitute in your own URL ...

mvn archetype:generate -DarchetypeCatalog=<<URL to your corporate repo/proxy goes here>> -Dfilter=multi-module

HTHs

Fraser.

View solution in original post

4 Replies

Avatar

Level 10

Typically Maven is used to build parts of a CQ project such as an OSGi bundle. I have never heard of converting an existing CQ project to Maven. We have lots of examples of using Maven to build OSGi bundles. 

Avatar

Correct answer by
Former Community Member

The links provided by Sham HC are probably the most useful, especially the first. We are relatively new to AEM/CQ. The recommendation from our consultancy partner is to use the CQ Maven Blueprints archetype (multi-module), that is covered in the first link. I will warn you though, the parent POM described by that article is not the one that is produced when using the archetype to generate the project. We also experienced a few issues with some of the dependencies (esp: taglib) and are currently working through them.

We maintain our own parent POM (which is heavily based on the one in the article - albeit many of the dependency versions are updated) which points to our internal corporate Maven repo which proxies to the CQ Blueprints repo and Adobe public (you need to set those up in eClipse - but I assume you already know how to do that). So when you run the maven command you just substitute in your own URL ...

mvn archetype:generate -DarchetypeCatalog=<<URL to your corporate repo/proxy goes here>> -Dfilter=multi-module

HTHs

Fraser.

Avatar

Community Advisor

Hi Sham,

    Sorry for my Ignorance. I also wanted to build the OSGI bundle, and i was totally unaware of Maven functionality.

 

Thanks

Veena