mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-07-31 17:39:14 +00:00
Documentation - Project structures
Complete project structure articles.
This commit is contained in:
@@ -76,7 +76,7 @@ The All-In-One project is recommended to be used if you have to develop a custom
|
||||
customizations on Alfresco Share client. If your plan to develop a project on the Alfresco Content Services Repository only, use the Platform JAR Maven
|
||||
archetype. If you plan to develop a project on the Alfresco Share client only, use the Share JAR Maven archetype.
|
||||
|
||||
For more information about the All-In-One project, see All-In-One project structure. **TODO**: Include link
|
||||
For more information about the All-In-One project, see [All-In-One project structure](structure-aio.md).
|
||||
|
||||
### org.alfresco.maven.archetype:alfresco-platform-jar-archetype
|
||||
|
||||
@@ -95,7 +95,7 @@ Services Repository. The samples included in the project are basic and straightf
|
||||
The Platform JAR project is recommended to be used if you have to develop a customization of the Alfresco Content Services Repository. If you also plan to
|
||||
develop a customization of the Alfresco Share client, use the All-In-One Maven archetype instead.
|
||||
|
||||
For more information about the Platform JAR project, see Platform JAR project structure. **TODO**: Include link
|
||||
For more information about the Platform JAR project, see [Platform JAR project structure](structure-platform.md).
|
||||
|
||||
### org.alfresco.maven.archetype:alfresco-share-jar-archetype
|
||||
|
||||
@@ -114,7 +114,7 @@ The samples included in the project are basic and straightforward, and can help
|
||||
The Share JAR project is recommended to be used if you have to develop a customization of the Alfresco Share client. If you also plan to develop a
|
||||
customization of the Alfresco Content Services Repository, use the All-In-One Maven archetype instead.
|
||||
|
||||
For more information about the Share JAR project, see Share JAR project structure. **TODO**: Include link
|
||||
For more information about the Share JAR project, see [Share JAR project structure](structure-share.md).
|
||||
|
||||
### org.alfresco.maven.archetype:activiti-jar-archetype (for use with SDK 2.2 only)
|
||||
|
||||
|
@@ -5,7 +5,7 @@ Last reviewed: 2019-01-15
|
||||
---
|
||||
# All-In-One project structure
|
||||
|
||||
The following pages provide a detailed description of the All-In-One (AIO) project, including the project structure and folder contents.
|
||||
This page provides a detailed description of the All-In-One (AIO) project, including the project structure and folder contents.
|
||||
|
||||
Now that you know what an All-In-One project is, let’s introduce the structure of the project, once it is created using the
|
||||
`org.alfresco.maven.archetype:alfresco-allinone-archetype`.
|
||||
@@ -228,8 +228,8 @@ Content | Description
|
||||
`src/main/resources/alfresco/module/<artifactId>` | This folder contains all the configuration files and settings for the Alfresco Share module. Here you can find the property file for the module.
|
||||
`src/main/resources/alfresco/web-extension` | In this folder you can find the extensions to the web client (Alfresco Share) and it's where you store Spring configurations that extend and override the system Share configuration. There are two important sub-directories here: `site-data` and `site-webscripts`.
|
||||
`src/main/resources/alfresco/META-INF/resources` | This folder hosts the content that will be placed in the `META-INF` folder of a standard Java web application. It is best practice to use a further subdirectory based on the module name. This allows you to manage multiple modules, so that their web resources don't conflict with each other.
|
||||
`src/main/resources/alfresco/ META-INF/share-config-custom.xml` | This file is a relevant Alfresco Share file used to configure the sub-project with the correct settings, depending on your environment. For more details, see [Share configuration](http://docs.alfresco.com/5.2/concepts/dev-extensions-share-configuration.html).
|
||||
|
||||
`src/main/resources/alfresco/META-INF/share-config-custom.xml` | This file is a relevant Alfresco Share file used to configure the sub-project with the correct settings, depending on your environment. For more details, see [Share configuration](http://docs.alfresco.com/5.2/concepts/dev-extensions-share-configuration.html).
|
||||
`src/test/java/<groupId>...` | This folder contains the same content you can find in a regular Java project, i.e. the Java source code for tests. Here you should put all the custom classes, interfaces, and Java source code related to tests.
|
||||
|
||||
## my-all-in-one-project-share-docker
|
||||
|
||||
@@ -243,4 +243,12 @@ Content | Description
|
||||
`src/main/docker` | In this folder you can find everything that's needed to fully configure the custom Alfresco Share Docker image.
|
||||
`src/main/docker/Dockerfile` | This is the file that define the custom Alfresco Share Docker image. The default configuration installs all the existing JARs and AMPs under `${project.build.directory}/extensions` folder and adds custom configuration files.
|
||||
|
||||
## integration-tests
|
||||
|
||||
Below is a description of the content in the `integration-tests` sub-project. This sub-project contains all the source code and resources needed to run the integration tests.
|
||||
|
||||
Content | Description
|
||||
--- | ---
|
||||
`pom.xml` | This XML file contains information about the project and configuration details used by Apache Maven to build the project. You can define all the configurations, parameters, and settings in this file even if it depends on the parent pom in the root folder. For the majority of use cases, settings and configurations are directly inherited from the parent pom, and this file can work in its default version.
|
||||
`src/main/java/<groupId>...` | This folder contains the same content you can find in a regular Java project, i.e. the Java source code. Here you should put all the custom classes, interfaces, and Java source code in general. The folder is empty by default.
|
||||
`src/test/java/<groupId>...` | This folder contains the same content you can find in a regular Java project, i.e. the Java source code for tests. Here you should put all the custom classes, interfaces, and Java source code in general related to tests. By default you can find three different tests related to content modelling, custom components, and web scripts.
|
||||
|
@@ -0,0 +1,117 @@
|
||||
---
|
||||
Title: Platform JAR project structure
|
||||
Added: v3.0.0
|
||||
Last reviewed: 2019-01-15
|
||||
---
|
||||
# Platform JAR project structure
|
||||
|
||||
This page provides a detailed description of the Platform JAR project, including the project structure and folder content.
|
||||
|
||||
Now that you know what a Platform JAR project is, let’s introduce the structure of the project, once it is created using the
|
||||
`org.alfresco.maven.archetype:alfresco-platform-jar-archetype`.
|
||||
|
||||
Below is an example directory structure of a Platform JAR created with `com.example` as `groupId` and `my-platform-jar-project` as `artifactId`.
|
||||
|
||||
```
|
||||
my-platform-jar-project
|
||||
├── pom.xml
|
||||
├── README.md
|
||||
├── run.bat
|
||||
├── run.sh
|
||||
├── docker
|
||||
| └── docker-compose.yml
|
||||
└── src
|
||||
├── main
|
||||
│ ├── assembly
|
||||
│ │ ├── amp.xml
|
||||
│ │ ├── file-mapping.properties
|
||||
│ │ └── web
|
||||
│ │ └── README.md
|
||||
│ ├── docker
|
||||
│ │ ├── alfresco-global.properties
|
||||
│ │ ├── dev-log4j.properties
|
||||
│ │ ├── disable-webscript-caching-context.xml
|
||||
│ │ ├── Dockerfile
|
||||
│ │ ├── hotswap-agent.properties
|
||||
│ │ └── license
|
||||
│ │ └── README.md
|
||||
│ ├── java
|
||||
│ │ └── com
|
||||
│ │ └── example
|
||||
│ │ └── platformsample
|
||||
│ │ ├── DemoComponent.java
|
||||
│ │ ├── Demo.java
|
||||
│ │ └── HelloWorldWebScript.java
|
||||
│ └── resources
|
||||
│ ├── alfresco
|
||||
│ │ ├── extension
|
||||
│ │ │ └── templates
|
||||
│ │ │ └── webscripts
|
||||
│ │ │ └── alfresco
|
||||
│ │ │ └── tutorials
|
||||
│ │ │ ├── helloworld.get.desc.xml
|
||||
│ │ │ ├── helloworld.get.html.ftl
|
||||
│ │ │ └── helloworld.get.js
|
||||
│ │ └── module
|
||||
│ │ └── my-platform-jar-project
|
||||
│ │ ├── alfresco-global.properties
|
||||
│ │ ├── context
|
||||
│ │ │ ├── bootstrap-context.xml
|
||||
│ │ │ ├── service-context.xml
|
||||
│ │ │ └── webscript-context.xml
|
||||
│ │ ├── messages
|
||||
│ │ │ └── content-model.properties
|
||||
│ │ ├── model
|
||||
│ │ │ ├── content-model.xml
|
||||
│ │ │ └── workflow-model.xml
|
||||
│ │ ├── module-context.xml
|
||||
│ │ ├── module.properties
|
||||
│ │ └── workflow
|
||||
│ │ └── sample-process.bpmn20.xml
|
||||
│ └── META-INF
|
||||
│ └── resources
|
||||
│ └── test.html
|
||||
└── test
|
||||
└── java
|
||||
└── com
|
||||
└── example
|
||||
└── platformsample
|
||||
└── HelloWorldWebScriptControllerTest.java
|
||||
```
|
||||
|
||||
From a high level standpoint, we can describe the content of the project as follows:
|
||||
* `my-platform-jar-project` (the root of the project) contains the whole project. It can easily be pushed into a version control repository and/or an internet
|
||||
hosting service like GitHub, SVN, CVS, etc.
|
||||
* The files stored into the root of the project are mainly related to actions and commands (running, debugging, etc.), technical configuration (`pom.xml`),
|
||||
and documentation (`README.md`).
|
||||
* `src` contains the source code, tests, configurations, settings and resources that are entirely dedicated to the customization of the Alfresco Content
|
||||
Services Repository.
|
||||
|
||||
After this brief introduction of the Platform JAR project, let’s focus on the content of the folders.
|
||||
|
||||
## Project root
|
||||
|
||||
Below is a description of the files in the root of the project (in this case, `my-platform-jar-project`).
|
||||
|
||||
File | Description
|
||||
--- | ---
|
||||
`run` (`sh` and `bat`) | Utility script to work with the project (compile, run, test, show logs, etc.). For detailed information about it, check [Working with generated projects](projects-usage.md).
|
||||
`pom.xml` | This XML file contains information about the project and configuration details used by Apache Maven to build the project.
|
||||
`README.md` | File in Markdown format containing the documentation for the project.
|
||||
|
||||
## `src` folder
|
||||
|
||||
Below is a description of the content in the `src` folder. This folder contains the source code, tests, configuration, settings, and resources entirely
|
||||
dedicated to the customization of the Alfresco Content Services Repository.
|
||||
|
||||
Content | Description
|
||||
--- | ---
|
||||
`src/main/assembly` | In this folder you can find everything that's needed to fully control creating the AMP artifact in the platform project. The main file to check is `amp.xml`.
|
||||
`src/main/docker` | In this folder you can find everything that's needed to fully configure the custom ACS Docker image.
|
||||
`src/main/docker/Dockerfile` | This is the file that define the custom ACS Docker image. The default configuration installs all the existing JARs and AMPs under `${project.build.directory}/extensions` folder and adds custom configuration and license files.
|
||||
`src/main/docker/license` | This folder contains the licenses required for running an Enterprise project.
|
||||
`src/main/java/<groupId>...` | This folder contains the same content you can find in a regular Java project, i.e. the Java source code. Here you should put all the custom classes, interfaces, and Java source code in general.
|
||||
`src/main/resources/alfresco/extension/templates/webscripts` | In this folder you can find the extensions to the REST API related to Web Scripts . Repository Web Scripts are defined in XML, JavaScript, and FreeMarker files. These are referred to as Data Web Scripts as they usually return JSON or XML. The default project contains a Hello World example.
|
||||
`src/main/resources/alfresco/module/<artifactId>` | This folder contains all the configuration files and settings for the Alfresco platform module. Here you can find context files, the `alfresco-global.properties` file, Content Model examples, and Activiti workflow examples.
|
||||
`src/main/resources/META-INF` | This folder hosts the content that will be placed in the `META-INF` folder of a standard Java web application.
|
||||
`src/test/java/<groupId>...` | This folder contains the same content you can find in a regular Java project, i.e. the Java source code for tests. Here you should put all the custom classes, interfaces, and Java source code related to tests.
|
||||
|
@@ -0,0 +1,112 @@
|
||||
---
|
||||
Title: Share JAR project structure
|
||||
Added: v3.0.0
|
||||
Last reviewed: 2019-01-15
|
||||
---
|
||||
# Share JAR project structure
|
||||
|
||||
The following page provides a detailed description of the Share client JAR project, including the project structure and folder content.
|
||||
|
||||
Now that you know what a Share JAR project is, let’s introduce the structure of the project, once it is created using the
|
||||
`org.alfresco.maven.archetype:alfresco-share-jar-archetype`.
|
||||
|
||||
Below is an example directory structure of a Share JAR created with `com.example` as `groupId` and `my-share-jar-project` as `artifactId`.
|
||||
|
||||
```
|
||||
my-share-jar-project
|
||||
├── pom.xml
|
||||
├── README.md
|
||||
├── run.bat
|
||||
├── run.sh
|
||||
└── src
|
||||
├── main
|
||||
│ ├── assembly
|
||||
│ │ ├── amp.xml
|
||||
│ │ ├── file-mapping.properties
|
||||
│ │ └── web
|
||||
│ │ └── README.md
|
||||
│ ├── docker
|
||||
│ │ ├── Dockerfile
|
||||
│ │ ├── hotswap-agent.properties
|
||||
│ │ ├── log4j.properties
|
||||
│ │ └── share-config-custom.xml
|
||||
│ ├── java
|
||||
│ │ └── com
|
||||
│ │ └── example
|
||||
│ └── resources
|
||||
│ ├── alfresco
|
||||
│ │ ├── module
|
||||
│ │ │ └── my-share-jar-project
|
||||
│ │ │ └── module.properties
|
||||
│ │ └── web-extension
|
||||
│ │ ├── messages
|
||||
│ │ │ └── my-share-jar-project.properties
|
||||
│ │ ├── my-share-jar-project-slingshot-application-context.xml
|
||||
│ │ ├── site-data
|
||||
│ │ │ └── extensions
|
||||
│ │ │ └── my-share-jar-project-example-widgets.xml
|
||||
│ │ └── site-webscripts
|
||||
│ │ ├── com
|
||||
│ │ │ └── example
|
||||
│ │ │ └── pages
|
||||
│ │ │ ├── simple-page.get.desc.xml
|
||||
│ │ │ ├── simple-page.get.html.ftl
|
||||
│ │ │ └── simple-page.get.js
|
||||
│ │ └── org
|
||||
│ │ └── alfresco
|
||||
│ │ └── README.md
|
||||
│ └── META-INF
|
||||
│ ├── resources
|
||||
│ │ └── my-share-jar-project
|
||||
│ │ └── js
|
||||
│ │ └── tutorials
|
||||
│ │ └── widgets
|
||||
│ │ ├── css
|
||||
│ │ │ └── TemplateWidget.css
|
||||
│ │ ├── i18n
|
||||
│ │ │ └── TemplateWidget.properties
|
||||
│ │ ├── templates
|
||||
│ │ │ └── TemplateWidget.html
|
||||
│ │ └── TemplateWidget.js
|
||||
│ └── share-config-custom.xml
|
||||
└── test
|
||||
└── java
|
||||
└── com
|
||||
└── example
|
||||
```
|
||||
|
||||
From a high level standpoint, we can describe the content of the project as follows:
|
||||
* `my-platform-jar-project` (the root of the project) contains the whole project. It can easily be pushed into a version control repository and/or an internet
|
||||
hosting service like GitHub, SVN, CVS, etc.
|
||||
* The files stored into the root of the project are mainly related to actions and commands (running, debugging, etc.), technical configuration (`pom.xml`),
|
||||
and documentation (`README.md`).
|
||||
* `src` contains the source code, tests, configurations, settings and resources that are entirely dedicated to the customization of the Alfresco Share client.
|
||||
|
||||
After this brief introduction of the Platform JAR project, let’s focus on the content of the folders.
|
||||
|
||||
## Project root
|
||||
|
||||
Below is a description of the files in the root of the project (in this case, `my-share-jar-project`).
|
||||
|
||||
File | Description
|
||||
--- | ---
|
||||
`run` (`sh` and `bat`) | Utility script to work with the project (compile, run, test, show logs, etc.). For detailed information about it, check [Working with generated projects](projects-usage.md).
|
||||
`pom.xml` | This XML file contains information about the project and configuration details used by Apache Maven to build the project.
|
||||
`README.md` | File in Markdown format containing the documentation for the project.
|
||||
|
||||
## `src` folder
|
||||
|
||||
Below is a description of the content in the `src` folder, which contains the source code, tests, configuration, settings, and resources entirely dedicated to
|
||||
the customization of the Alfresco Share client.
|
||||
|
||||
Content | Description
|
||||
--- | ---
|
||||
`src/main/assembly` | In this folder you can find everything that's needed to fully control creating the AMP artifact in the platform project. The main file to check is `amp.xml`.
|
||||
`src/main/docker` | In this folder you can find everything that's needed to fully configure the custom Alfresco Share Docker image.
|
||||
`src/main/docker/Dockerfile` | This is the file that define the custom Alfresco Share Docker image. The default configuration installs all the existing JARs and AMPs under `${project.build.directory}/extensions` folder and adds custom configuration files.
|
||||
`src/main/java/<groupId>...` | This folder contains the same content you can find in a regular Java project, i.e. the Java source code. Here you should put all the custom classes, interfaces, and Java source code in general.
|
||||
`src/main/resources/alfresco/module/<artifactId>` | This folder contains all the configuration files and settings for the Alfresco Share module. Here you can find the property file for the module.
|
||||
`src/main/resources/alfresco/web-extension` | In this folder you can find the extensions to the web client (Alfresco Share) and it's where you store Spring configurations that extend and override the system Share configuration. There are two important sub-directories here: `site-data` and `site-webscripts`.
|
||||
`src/main/resources/alfresco/META-INF/resources` | This folder hosts the content that will be placed in the `META-INF` folder of a standard Java web application. It is best practice to use a further subdirectory based on the module name. This allows you to manage multiple modules, so that their web resources don't conflict with each other.
|
||||
`src/main/resources/alfresco/META-INF/share-config-custom.xml` | This file is a relevant Alfresco Share file used to configure the sub-project with the correct settings, depending on your environment. For more details, see [Share configuration](http://docs.alfresco.com/5.2/concepts/dev-extensions-share-configuration.html).
|
||||
`src/test/java/<groupId>...` | This folder contains the same content you can find in a regular Java project, i.e. the Java source code for tests. Here you should put all the custom classes, interfaces, and Java source code related to tests.
|
||||
|
Reference in New Issue
Block a user