Welcome to the Maven Alfresco Extension Archetype home

You've reached the ( http://maven.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/maven-alfresco-archetypes/maven-alfresco-extension-archetype ) Maven Alfresco Extension archetype home page (version: 1.9.1)

Description

This archetype developed aims to provide a standardized approach to development, release and deployment of Alfresco extensions (as opposed to AMP builds, to be released as a different artifact ). Using standard m2 lifecycle commands (mvn compile package deploy) and generally available plugins (cargo, release, assembly) we are able to cover a very high percentage of Alfresco lifecycle common use cases. It can be used both with Maven2 and Ant build systems, but it must be clear that *only* the Maven2 approach provides all the automation features we will describe in this website. In addition to that the m2 approach provides a zero-conf approach while ant requires (as usual) manual gathering and selection of required alfresco libraries and webapp (please refer to README-ant.txt for further info about the Ant build). Last but not the least, m2 build is more likely to be maintained and improved (especially in the likely case Alfresco moves to maven2). For more details on the m2 apprach please refer instead to README Section (or directly and to README-m2.txt of the generated project).

Quick Start Project Creation

For a quick start you can a maven alfresco extension project created by just running (maven 2.0.6+ required):

mvn archetype:generate -DarchetypeCatalog=http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml

and then choose the option 'maven-alfresco-extension-archetype' and fill your custom project information. You can also do this via Eclipse using the m2eclipse plugin.

Run your project in 3 minutes

The command below allows you to package your customization, run unit tests and eventually run jetty embedded with Alfresco

mvn install -Prun

You should be able to point your browser to http://localhost:8080/alfresco and see your nice custom Alfresco running. You might need to raise the MAVEN_OPTS memory allocated to Maven, see the FAQ section for this faq.html. \

Prerequisite:

The only prerequisite is to have a Mysql instance running with proper permissions for the DB user, password and name configured in the POM. The default configuration can be found in the generated pom.xml file and goes as follows:

  <alfresco.data.location>./alf_data_jetty</alfresco.data.location>
  <alfresco.db.name>alf_jetty</alfresco.db.name>
  <alfresco.db.username>alfresco</alfresco.db.username>
  <alfresco.db.password>alfresco</alfresco.db.password>