- Create a suitable directory in which to store your Maven projects (if you have not already done so), such as maven_projects.
- Change into your maven_projects directory.
Run the following command:
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:
You will be prompted to choose an archetype:
Choose archetype: 1: remote -> org.alfresco.maven.archetype:alfresco-allinone-archetype (Sample multi-module project for All-in-One development on the Alfresco plaftorm. Includes modules for: Repository WAR overlay, Repository AMP, Share WAR overlay, Solr configuration, and embedded Tomcat runner) 2: remote -> org.alfresco.maven.archetype:alfresco-amp-archetype (Sample project with full support for lifecycle and rapid development of Repository AMPs (Alfresco Module Packages)) 3: remote -> org.alfresco.maven.archetype:share-amp-archetype (Share project with full support for lifecycle and rapid development of AMPs (Alfresco Module Packages)) Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): :
Enter 1 to have the Alfresco SDK create an Alfresco
All-in-One Archetype project.
The detailed documentation for this archetype can be found here.
You will be prompted to choose an archetype version:
Choose org.alfresco.maven.archetype:alfresco-allinone-archetype version: 1: 2.0.0-beta-1 2: 2.0.0-beta-2 3: 2.0.0-beta-3 4: 2.0.0-beta-4 5: 2.0.0 Choose a number: 5:
Hit enter to select the default (the latest version).
- You will then be prompted to enter a value for the property groupId. Enter com.alfresco.tutorials for the groupId (this can be thought of as the package name).
- You will then be prompted to enter a value for the artifactId. Enter allinone-project as the artifactId.
You will then be prompted to enter a value for the Alfresco version you wish to
test against. Currently the default is 5.0.c (Alfresco Community). Hit the enter
key to accept the default value.
A new project directory containing a number of sub-directories and support files for the AMP will be created in the directory allinone-project.
Change into the freshly created allinone-project directory
and browse the various files and directories to see what has been created.
The following directory has been created for you:
run.sh pom.xml |-> repo |-> repo-amp |-> share-amp |-> share |-> solr |-> runner (a Tomcat embedded runner / integration test runner)
Look in the directory ./amp/src/main/amp. Notice important files, such as the module.properties file, have been created for you.
At this point, before you have made any changes, you can build the project by
mvn installNote: Maven will ensure that all requirements are downloaded. This make take some time.
The project will return with the message BUILD SUCCESS.
You can build, load RAD requirements, and run your project by typing:
./run.shAttention: You may first need to make the shell script executable using the command chmod +x run.sh.
Direct your web browser to:
You can log in using a user name of admin and a password of admin.