Expand my Community achievements bar.

SOLVED

Building CQ project structure with CqBluePrints archetype

Avatar

Level 1

Hi All,

Had gone through an excellent presentation on CQ (CQ maven methods, youtube). Here in my company, we are trying to build a new vertical “CQ” in the right track. We are planning to build the cq platform using the “cqblueprints” archetype (After some research, and based on the presentation).

We are looking for some expert opinion as currently we don’t have much experience in this area. Please find some of our basic doubts and please help us

1.       Is it a right decision to go ahead with “cqblueprints”?
2.       In the initial structure created by the archetype, how can we define multiple services (OSGi bundles) to bring in a logic al separation between components.

For point one, got a go-ahead but still lacks clarity in the point 2. Please advise.

Thanks and regards,
Santhosh

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Santosh,

I'm not familiar with the cqblueprints archetypes, but I can tell you how this works with the "official" archetypes from Adobe[1] and Apache Sling[2]. The key decision point you need to reach is whether your application modules (including content packages and OSGi bundles) are versioned in lockstep with each other or have independent versions. The former is easier to execute, but can result in extraneous releases of unchanged modules. For example, if you look at the project structure of ACS AEM Commons (https://github.com/Adobe-Consulting-Services/acs-aem-commons), it is composed of a content package and two OSGi bundles. In a few cases, we have done a release where the twitter bundle had not changed, but since all three modules are released together, that's going to happen from time to time.

This is, FWIW, a general issue with complex Maven projects, e.g. JavaEE projects combining EAR, JAR, and WAR modules.

With that context, with respect to the official archetypes:

If you wanted to have a multimodule project versioned in lockstep, you can start with the Adobe Multi Module Content Package Archetype. This will start you with a single OSGi bundle and content package. You can then create additional bundles using the Sling JCR Install Bundle archetype.

If you wanted to have multiple independent projects, can you start with the Sling JCR Install Bundle archetype and the Adobe Simple Content Packge Archetype.

I have to imagine that something similar is possible with the CQ Blueprints archetype.

HTH,

Justin

[1] http://bit.ly/1paF1UN

[2] http://bit.ly/1paF572

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

Hi Santosh,

I'm not familiar with the cqblueprints archetypes, but I can tell you how this works with the "official" archetypes from Adobe[1] and Apache Sling[2]. The key decision point you need to reach is whether your application modules (including content packages and OSGi bundles) are versioned in lockstep with each other or have independent versions. The former is easier to execute, but can result in extraneous releases of unchanged modules. For example, if you look at the project structure of ACS AEM Commons (https://github.com/Adobe-Consulting-Services/acs-aem-commons), it is composed of a content package and two OSGi bundles. In a few cases, we have done a release where the twitter bundle had not changed, but since all three modules are released together, that's going to happen from time to time.

This is, FWIW, a general issue with complex Maven projects, e.g. JavaEE projects combining EAR, JAR, and WAR modules.

With that context, with respect to the official archetypes:

If you wanted to have a multimodule project versioned in lockstep, you can start with the Adobe Multi Module Content Package Archetype. This will start you with a single OSGi bundle and content package. You can then create additional bundles using the Sling JCR Install Bundle archetype.

If you wanted to have multiple independent projects, can you start with the Sling JCR Install Bundle archetype and the Adobe Simple Content Packge Archetype.

I have to imagine that something similar is possible with the CQ Blueprints archetype.

HTH,

Justin

[1] http://bit.ly/1paF1UN

[2] http://bit.ly/1paF572