You are here

Install Maven

The Alfresco SDK is now based around Maven (formerly it used Ant). To use the Alfresco SDK you need to have Maven installed.
To be able to use Maven you need to have a suitable JDK installed. For this version of the SDK you should have JDK 1.7 installed.
To use the Alfresco SDK you need to have Maven installed. The version required is 3.2.5 and above.

Check for the availability of Maven.

  1. First, check to see if you already have the correct version of Maven installed. On your command line enter the following command:

                    
    mvn --version        
                    
                

    If you get "command not found", or you have a version of Maven less than 3.2.5, you will need to install Maven or upgrade to 3.2.5 or above. In this case it is recommended you download the correct version of Maven (3.2.5+) from the official Maven website.

Downloading Maven.

  1. Download Maven from the Apache Maven project web site.

Installing Maven.

  1. Carefully review the platform-specific installation instructions in the Maven documentation.
  2. Install Maven using the platform-specific instructions provided in the Maven documentation.

Verifying Maven is correctly installed.

  1. Run the following command to verify Maven is correctly installed:

                            
    mvn --version                        
                            
                        

    This will display information such as the following:

                            
    Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
    Maven home: /Users/tbedford/apache-maven-3.2.5
    Java version: 1.7.0_71, vendor: Oracle Corporation
    Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre
    Default locale: en_US, platform encoding: UTF-8
    OS name: "mac os x", version: "10.10", arch: "x86_64", family: "mac"
    
                        

    Check that the correct versions of Maven and the JDK are being used. If Maven is not using the correct version of the JDK, make sure you have set your JAVA_HOME environment variable, as described in the previous tutorial.

You have now installed Maven and verified that it is the correct version and is using the correct version of the JDK.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.