Alfresco SDK 3.0 Walkthrough, Part 2

If you missed our first part of this walkthrough series, you’ll want to check that out first, as it will inform this one. In the last post we talked about setting up the base project and discussed the pom files.

Now, we’ll dive a little deeper into the folder structures and other files, and how they’ll be used in the project.

Src

This folder is at the base of the project and only contains the “test” folder.

Test

Inside this folder is where you will find a “license” folder (for placing/testing with licenses), a “properties” folder where you can define your local alfresco-global.properties based on the DB type that’s enabled in the main pom file, and a “resources” folder where you can manage your hotswap-agent.properties for each module, as well as alfresco, share, and tomcat specifics, such as the context-solr.xml file or dev-log4.properties file.

Integration tests

This structure will not include an in depth overview like the next two structures, as the integration tests are meant to test integration, which are usually clients accessing the Alfresco platform to perform tasks.

Src/Test

This is where the test’s properties, resources and java test classes will reside for this module.

Src/Main

This directory holds Java classes that will perform your integration tests.

Platform Folder

Src/Test/Java

This folder will hold your JUnit tests for your platform extensions.

Src/Main

Assembly/Web

At the base of the “Assembly” directory there are an “amp.xml” and a “file-mapping.properties” (shown below) file which both provide information and configuration for if you’re building AMP files instead of JAR files. The “web” directory is for overriding any out of the box resources only. New Web resources have their own location.

Java

Any custom Java you write for your extensions will go in this folder. This is Java for platform/repository side webscripts or other extensions.

Resources/Alfresco

In the previous SDK versions this “alfresco” directory would be under “src/main/amp/config” in the “repo-amp” directory of your project. Not much as changed, except the module.properties file is inside with the module-context.xml file, along with any alfresco-global.properties particular to your extension.

Resources/META-INF

This folder will hold additional web resources for your platform instance, for example, if you’re including servlets inside of your solution, this is where they’d go.

Share Folder

Src/Test/Java

This folder will hold your JUnit tests for your share extensions.

Src/Main

Assembly/Web

At the base of the “Assembly” directory there are an “amp.xml” (shown below) and a “file-mapping.properties” file which both provide information and configuration for if you’re building AMP files instead of JAR files. The “web” directory is for overriding any out of the box resources only. New Web resources have their own location.

Java

Any custom Java you write for your extensions will go in this folder. This is Java for share side webscripts or other extensions.

Resources/Alfresco

In the previous SDK versions this “alfresco” directory would be under “src/main/amp/config” in the “share-amp” directory of your project. It is also important to note that if you’re extending or overriding any out of the box functions, the “resources” directory will be the base directory for the start of those packages (i.e. if a package doesn’t start with “alfresco”, and instead starts with “org”).

Resources/META-INF

This is where your share-config-custom.xml file will go. There’s another directory under META-INF also named “resources” that will hold your module’s web resources, and javascript/CSS extensions.

This concludes part two of our walkthrough.

Thanks for reading, and Happy Building!

Leave a Reply

Your email address will not be published. Required fields are marked *

From our Blog...

Configuring Alfresco SAML SSO Module with Okta IdP

Alfresco recently released a new patch for their SAML Single Sign On solution module. This module allows Alfresco user’s to configure their Alfresco installation with their Single Sign On (SSO) Identity Provider. In this tutorial, I’ll explain the process of configuring Okta to be used with the module. Note: This tutorial is assuming you’ve followed… Read more »

Read More

Content Migration: Being Prepared

Much like negotiating a treaty between two countries who do not share a common language, someone will be faced with the task of translating. If that translator is not properly prepared the outcome might create more problems than it solves.

Read More

Debugging and Integration Testing in Alfresco SDK 3.0

Alfresco has updated its SDK! See our articles here and here about the basics. In its current state, SDK 3.0 doesn’t support unit testing. It does, however, have a robust Integration Testing framework which, in many ways, covers the same ground and then some. In this article I’ll be going into the basics of Integration… Read more »

Read More