You are here

Project structure

When you create an instance of an archetype, a pre-defined directory structure is created for you, containing important files such as your project's pom.xml file, and directories such as src/main/java to contain source code.

The main parts of the project structure created with the Alfresco SDK simple AMP archetype are as follows:

File/directory Description
pom.xml This file tells Maven all it needs to know about your project. This includes information such as the archetype version and the Alfresco version the project uses. These values can be modified by hand if required.
src/main/java This is where you organize your own packages and source code. The code gets packaged into a JAR file. When the AMP is applied to the Alfresco WAR file, the JAR will get placed in the directory WEB-INF/lib.
src/test The code and resources in this directory relate to the running of unit tests. The unit tests are located in src/test/java. Resources used by the source files are located in src/test/resources. In src/test/properties/local is an file. This file is used to configure Alfresco while running unit tests.
src/main/amp The remainder of the project is located here. The AMP structure is documented in the module documentation. The structure contains important files such as the file, which contains information about AMP such as its ID, version, dependencies, and minimum and maximum versions of Alfresco required to run it.
Attention: The projects generated by the archetypes contains sample projects to get you up and running quickly. Once the project has been generated, you can explore the directory structure to examine the details of the sample projects. For example, the project generated by the Share AMP archetype contains a sample Aikau project that you can explore and experiment with.

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.