Friday, May 24, 2013

Setup developer machine with Eclipse for a new CQ project

1) Follow the steps here http://www.cqblueprints.com/xwiki/bin/view/Blue+Prints/The+CQ+Project+Maven+Archetype

2) To be able to build maven module projects with out any errors, you need to add the below to the “Parent” maven project’s pom.xml

<plugin>

<groupId>org.eclipse.m2e</groupId>

<artifactId>lifecycle-mapping</artifactId>

<version>1.0.0</version>

<configuration>

<lifecycleMappingMetadata>

<pluginExecutions>

<pluginExecution>

<pluginExecutionFilter>

<groupId>org.apache.felix</groupId>

<artifactId>maven-scr-plugin</artifactId>

<versionRange>[1.7.4,]</versionRange>

<goals>

<goal>scr</goal>

</goals>

</pluginExecutionFilter>

<action>

<ignore />

</action>

</pluginExecution>

<pluginExecution>

<pluginExecutionFilter>

<groupId>com.squeakysand.jsp</groupId>

<artifactId>jsptld-maven-plugin</artifactId>

<versionRange>[0.4.0,]</versionRange>

<goals>

<goal>generate</goal>

</goals>

</pluginExecutionFilter>

<action>

<ignore />

</action>

</pluginExecution>

<pluginExecution>

<pluginExecutionFilter>

<groupId>org.apache.felix</groupId>

<artifactId>maven-bundle-plugin</artifactId>

<versionRange>[2.3.7,]</versionRange>

<goals>

<goal>scr</goal>

</goals>

</pluginExecutionFilter>

<action>

<ignore />

</action>

</pluginExecution>

</pluginExecutions>

</lifecycleMappingMetadata>

</configuration>

</plugin>

3) Change settings.xml to use nexus as dependency manager.

4) Add Adobe maven repository to nexus and CQ Blueprints repository to nexus by following the URLs: http://www.cqblueprints.com/xwiki/bin/view/Blue+Prints/Connecting+to+the+CQ+Blueprints+Repository and http://www.cqblueprints.com/xwiki/bin/view/Blue+Prints/Connecting+to+the+Adobe+Maven+Repository

5) Once all is done, you can run one of the module project as directed in the documentation with Goal as “auto-deploy”

3 comments:

  1. If you are looking for a new project management job or if you might have asked for a promotion within your company then you might have heard aboutPMP credentials!!. It is true that a Project Management Professional (PMP) credential is one of the most sought certifications by employers and employees alike. For its detail information about a PMP certifications you can go through http://www.pmstudy.com/

    ReplyDelete
  2. hi, i have followed your steps to generate the project and add the extra configuration. All works fine except taglibs project. I get the following error

    Error(s) found in manifest configuration (org.apache.felix:maven-bundle-plugin:2.3.7:bundle:default-bundle:package)

    for the below lines in pom.xml



    org.apache.felix
    maven-bundle-plugin
    true


    com.test.sample.taglib.osgi.Activator

    META-INF/${project.artifactId}-${project.version}.tld=${project.build.outputDirectory}/META-INF/${project.artifactId}-${project.version}.tld,
    {maven-resources}


    /META-INF/tags





    Can you help please...
    Thanks

    ReplyDelete
  3. Thanks for sharing these. It’s always useful to get pointers to the good blogs out there. You might also be interested to know more about our company Adobe Users Email List, which is one of the leading database marketing, data intelligence and digital marketing service provider. Suitable to small scale to large scale companies which will focus on driving more revenue and increase profitability.

    ReplyDelete