How to convert a CQ project to Maven | Community
Skip to main content
VeenaVikraman
Community Advisor
Community Advisor
October 16, 2015
Solved

How to convert a CQ project to Maven

  • October 16, 2015
  • 4 replies
  • 1092 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by

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.

4 replies

smacdonald2008
Level 10
October 16, 2015

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. 

Accepted solution
October 16, 2015

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.

VeenaVikraman
Community Advisor
Community Advisor
October 16, 2015

Hi Sham,

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

 

Thanks

Veena