• Contact Us: 1 604 428 7548
This week’s How-to will explain you how to get started with Alfresco SDK using Maven.

From Alfresco 5.0.X version Alfresco has been moved to Maven based SDK from Ant Based SDK, here I want to give you how to start with Alfresco SDK using Maven.

Pre requisites for Alfresco Maven SDK:

JDK 1.7 and Maven 3.2.5 installed

Credential to access Alfresco Private Repository. Enterprise artifacts are stored in Alfresco Private Repository and it can be accessed only by Enterprise users, please refer to this knowledge base article.

Change into your Maven configuration directory. For Linux and Mac OS X that will most likely be ~/.m2 for a configuration on a per-user basis, or for global configuration in <maven_install>/conf/. On Windows this would be located in %USER_HOME%/.m2/ for a per-user configuration, and %M2_HOME%/conf for a global configuration.

  1. Edit settings.xml to add your private server credentials those you obtained from Alfresco. As below:



  1. Create a directory where you want to create new maven based project


  1. From command prompt open the above created directory and type the following command:



  1. Next you need to choose archtype. Here Select the All-in-One


  1. Select the default archetype version number.


  1. Then, You will be prompted to enter a value of groupId. Its like package name. You can enter any. Then you will be asked to define artifactId. It can be like your project name.


  1. Next, You will be prompted to enter a value for the Alfresco version you wish to develop against – currently the default is 5.0.0 . Hit the Enter key to accept the default value. Later we will change it.
    You will get some logs and your new project is created with required folders and configuration files


  1. Now go to the project directory and add alfresco enterprise repository to pom.xml file



  1. Now we are set to build the project, open project folder on command prompt and type the below command


This will build the project, downloading Enterprise artifacts from the Alfresco private repository as required, and run the project.

Once the application is running you can point your web browser at http://localhost:8080/share.

You might need to wait some time before Alfresco has fully started. Look for the message: INFO: Starting ProtocolHandler [“http-bio-8080”], which indicates the server has started.



Below are some useful commands:

To build project:


Install amp in your local repo:


By default, build includes to run test, If you want to skip test cases


To delete all compiles artifacts

Reva supports a large range of technologies and has extensive experience on various content management solutions.

Sagar Nimmala
Expert in Alfresco and JAVA, I have around 5 years of experience and I currently live and work in Hyderabad. My hobbies include trouble shooting with issues and exploring new technologies.

Leave a Reply

Your email address will not be published.