Adding AMPs to an Alfresco SDK 2 project

The other day, I had a need to add the Google Docs integration functionality to an existing Alfresco SDK 2 Maven project.  The project was setup with the All-In-One architype.  Below are the steps I implemented to enable the Google Docs integration in my project.

The repo (<project root>/repo/pom.xml) and share (<project root>/share/pom.xml) poms must be updated to include the required dependencies and overlays.

You’ll need to insert the following elements into their respective parent elements (<dependencies> & <overlays>) in the repo pom (<project root>/repo/pom.xml).

<dependency>
<groupId>org.alfresco.integrations</groupId>
<artifactId>alfresco-googledocs-repo</artifactId>
<version>2.0.8</version>
<type>amp</type>
</dependency>

<overlay>
<groupId>org.alfresco.integrations</groupId>
<artifactId>alfresco-googledocs-repo</artifactId>
<type>amp</type>
</overlay>

Likewise, add the following elements into their respective parent elements (<dependencies> & <overlays>) in the share pom (<project root>/share/pom.xml).

<dependency>
<groupId>org.alfresco.integrations</groupId>
<artifactId>alfresco-googledocs-share</artifactId>
<version>2.0.8</version>
<type>amp</type>
</dependency>

<overlay>
<groupId>org.alfresco.integrations</groupId>
<artifactId>alfresco-googledocs-share</artifactId>
<type>amp</type>
</overlay>

Lastly, add the following to alfresco-global.properties (<project root>/repo/src/main/properties/local).

googledocs.enabled=true

Be sure to clean your project after making this changes.

These steps can be followed to add any AMPs (yours, Alfresco’s, or any 3rd party’s) to your Alfresco SDK 2 project.

At the time of writing this post, 2.0.8 is the latest available version.  A quick search for googledocs in the Alfresco Artifacts Repository (artifacts.alfresco.com) will allow you to confirm which version is the latest.

Happy Hacking,
Ben

Advertisements

One thought on “Adding AMPs to an Alfresco SDK 2 project

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s