search cq related information on adobe, day, jackrabbit, sling and other sites
   We would like to hear from you. Suggestions to improve cqblueprints.com are very welcome. Please contact us.
Loading
Blueprints » Connecting to the CQ Blueprints Repository

Connecting to the CQ Blueprints Repository

Last modified by Craig S. Dickson on 2012/04/02 19:06

What is the CQ Blueprints Maven Repository?

The CQ Blueprints Maven Repository is a publicly accessible Maven Repository (just like Maven Central) that contains the artifacts from the CQ Blueprints project.

If you intend to use Apache Maven as the build tool for your CQ Project (recommended), AND you want to use the CQ Blueprints artifacts, you will need to configure your development environment to access to the CQ Blueprints Maven Repository.

Access Options

Proxy the CQ Blueprints Repository through another Repository

The recommended way to connect to the CQ Blueprints Maven Repository is by proxying it through your own or your team's in house repository. If you do not already have your own repository, then Sonatype Nexus is a free open source repository that can be downloaded and installed easily (Nexus is the repository manager used by Adobe and Maven Central among many other public repositories).

Once you have access to your own or team's Repository, configure it to proxy the CQ Blueprints Maven Repository which is located at this URL: http://dev.cqblueprints.com/nexus/content/repositories/releases/

Define the CQ Blueprints Repository in settings.xml

If you do not have access to your own or a team Maven Repository, then you can configure your own local development environment to access the CQ Blueprints Maven Repository.

In your own settings.xml file (usually located at /.m2/settings.xml) you can define additional repositories that Maven will access during the build process to find the necessary dependencies and plugins. To define the CQ Blueprints Maven Repository, add the following to your settings.xml:

       <profile>
           <id>cqblueprints</id>
           <activation>
               <activeByDefault>true</activeByDefault>
           </activation>
           <repositories>
               <repository>
                   <id>cqblueprints.releases</id>
                   <name>CQ Blueprints Release Repository</name>
                   <url>http://dev.cqblueprints.com/nexus/content/repositories/releases/</url>
                   <releases>
                       <enabled>true</enabled>
                   </releases>
                   <snapshots>
                       <enabled>false</enabled>
                   </snapshots>
               </repository>
           </repositories>
           <pluginRepositories>
               <pluginRepository>
                   <id>cqblueprints.plugins.releases</id>
                   <name>CQ Blueprints Plugin Release Repository</name>
                   <url>http://dev.cqblueprints.com/nexus/content/repositories/releases/</url>
                   <releases>
                       <enabled>true</enabled>
                   </releases>
                   <snapshots>
                       <enabled>false</enabled>
                   </snapshots>
               </pluginRepository>
           </pluginRepositories>
       </profile>

Using Maven Profiles to Improve Build Performance

In the above XML snippet, the cqblueprints Profile is configured to be active by default, which means it will be available in every Maven build in your local environment. If you are only developing Adobe CQ projects, this is probably the correct configuration.

However, if you work on other Maven projects in your local environment that do not require access to the Adobe CQ artifacts, you will notice a build performance improvement if you selectively turn the cqblueprints Profile on only for your Adobe CQ projects. To do this, remove the <activation>...</activation> tag from the XML snippet above which will disable the cqblueprints Profile by default. Then for each or your Adobe CQ projects you will enable the Profile, by either using the -P command line switch (eg. mvn -P cqblueprints install), or by activating it from within your IDE (in Eclipse, look for the Maven tab under the Project Properties dialog for each project).

Tags:
Created by Craig S. Dickson on 2012/04/02 18:43
cqblueprints provided by headwire.com, Inc