The New Stuff

alfresco

Using the Alfresco archetype to create project


Alfresco Enterprise version 4.1.2 onwards, it fully supports maven for building both Alfresco and Share. Also Alfresco provides well structured archetypes for AMP and All-in-one development. I would like to show how to use the new archetype to create a customisation Alfresco project.

Alfresco AMP archetype

The Maven Alfresco SDK Alfresco AMP archetype can be used to create an AMP-based project. This is used for simple, single module applications.

Alfresco All-in-One archetype

The All-in-One archetype of the Maven Alfresco SDK can be used to create a comprehensive multi-module project.

Creating an Alfresco Project

To start a new Alfresco Maven project with maven need to execute below command in the command line :

mvn archetype:generate

Alfresco provides a list of available Maven Archetype that can be use to create one of above Alfresco project. To see the available list of archetype and select one execute the below command in your command line :

mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -Dfilter=org.alfresco.maven.archetype:

You will be prompted to choose an archetype:

Choose archetype:
 1: https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -> \
 org.alfresco.maven.archetype:alfresco-amp-archetype (Sample project with full support \
 for lifecycle and rapid development of AMPs (Alfresco Module Packages))
 2: https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -> \
 org.alfresco.maven.archetype:alfresco-allinone-archetype (Sample multi-module project \
 for All-in-One development on the Alfresco plaftorm. Includes modules for: \
 Repository, AMP, Share, Solr, Web Quick Start and embedded Tomcat run)
 Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): :

From the above list if you need to create an AMP module project select 1 and press enter. If you need All-in-one project than choose the 2nd option from above list.

Building the Project

To build the project need a small command which need to run in the command line :

 mvn install

Usually if you are building the project for the first time it takes quite a while to build. Because it need to download the plugins and the dependencies to the local Maven repository. Than after that it won’t take that much time to build the project.

For further references :

Alfresco Enterprise version 4.1.2 onwards, it fully supports maven for building both Alfresco and Share. Also Alfresco provides well structured archetypes for AMP and All-in-one development. I would like to show how to use the new archetype to create a customisation Alfresco project. Alfresco AMP archetype The Maven Alfresco SDK Alfresco AMP archetype can be used to create an AMP-based project. This is used for simple, single module applications. Alfresco All-in-One archetype The All-in-One archetype of the Maven Alfresco SDK can be used to create a comprehensive multi-module project. Creating an Alfresco Project To start a new Alfresco Maven project with maven need to execute below command in the command line : mvn archetype:generate Alfresco provides a list of available Maven Archetype that can be use to create one of above Alfresco project. To see the available list of archetype and select one execute the below command in your command line : mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -Dfilter=org.alfresco.maven.archetype: You will be prompted to choose an archetype: Choose archetype: 1: https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -> \ org.alfresco.maven.archetype:alfresco-amp-archetype (Sample project with full support \ for lifecycle and rapid development of AMPs (Alfresco Module Packages)) 2: https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -> \ org.alfresco.maven.archetype:alfresco-allinone-archetype (Sample multi-module project \ for All-in-One development on the Alfresco plaftorm. Includes modules for: \ Repository, AMP, Share, Solr, Web Quick Start and embedded Tomcat run) Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : From the above list if you need to create an AMP module project select 1 and press enter. If you need All-in-one project than choose the 2nd option from above list. Building the Project To build the project need a small command which need to run in the command line : mvn install Usually if you are building the project for the first time it takes quite a while to build. Because it need to download the plugins and the dependencies to the local Maven repository. Than after that it won't take that much time to build the project. For further references :
  • https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/index.html
  • https://wiki.alfresco.com/wiki/Maven_Alfresco_SDK
  • https://groups.google.com/forum/?fromgroups#!forum/maven-alfresco
  • http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-tutorials.html
  • http://docs.alfresco.com/4.2/tasks/dev-extensions-maven-sdk-tutorials-amp-archetype.html
  • http://docs.alfresco.com/4.2/tasks/dev-extensions-maven-sdk-tutorials-all-in-one-archetype.html

If you find this useful please rate this

User Rating: 2.6 ( 2 votes)
0

Comments

comments

Recently Published

»

Gmail Power Tips: How To Integrate Your Facebook, Twitter, Yahoo, Friendfeed In Your Gmail

We all love Google and its very famous web mail service, Gmail. I ...

article image
»

WINE 1.2 STABLE RELEASED – 2 YEARS, 23, 000 CHANGES

Wine 1.2 stable has finally been released today after more than two ...

article image
»

safe anonymous browsing – no more banned or blocked websites!

Safe anonymous browsing no more banned or blocked ...

article image
»

Keyboard Short cuts…

Keyboard Short cuts… Getting used to using your keyboard ...

Cydia
»

iOS 5 Semi-Tethered Jailbreak Released, Here’s Your Full Guide!

While both the iPhone Dev Team and Chronic Dev Team are working on ...

iPhone4S7
»

iPhone 4S HD 1080p Video Almost As Well As A $3000 Canon DSLR Camera (VIDEO)

The iPhone 4S, it’s really changing the world. I love Siri, you ...

Siri-iPod-Touch
»

Siri Successfully Ported To iPod Touch Too, Still Not Connected To Apple’s Servers

Everyone wants Siri on their older iOS devices and yes, hackers are ...

1
»

Apple Wins Patent For “Slide To Unlock” Gestures !

We all love iPhone because of it’s features and multi ...

FireFox-8
»

Firefox 8 For Windows And Mac Now Available For Download!

Mozilla has released Firefox 8 for both Windows and Mac OS X. ...

Get Adobe Flash player