Commit 12db1fcb authored by Jose Luis Osorno's avatar Jose Luis Osorno
Browse files

Documentation - Update documentation to SDK 4.1

- Update SDK and ACS versions
- New article how to setup ATS in alfresco community
- New troubleshooting section about configuring ATS
parent 3e4a793f
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ If you are an Enterprise customer check the [Support](#alfresco-enterprise-custo

## News

- 2019-10: Alfresco SDK 4.1.0 released
- 2019-03: Alfresco SDK 4.0.0 released
- 2019-03: Alfresco SDK 3.1.0 released
- 2017-06-23: Alfresco SDK 3.0.1 released, [containing a critical bugfix](https://github.com/Alfresco/alfresco-sdk/issues/461)
@@ -25,12 +26,13 @@ If you are an Enterprise customer check the [Support](#alfresco-enterprise-custo
## User Getting Started

### Latest Documentation
To get started with **Alfresco SDK 4.0.x** (latest) visit the [Alfresco Documentation](docs/README.md).
To get started with **Alfresco SDK 4.1.x** (latest) visit the [Alfresco Documentation](docs/README.md).

#### Documentation about Previous Versions
| SDK Version  | Alfresco Enterprise Version       |  Alfresco Community Version       | Documentation  |
| ------------- |:-------------:| :-----:|:-----|
| SDK 4.0   | Alfresco 6.0.x / 6.1.x | Alfresco 6.0.x / 6.1.x | https://github.com/Alfresco/alfresco-sdk/tree/master/docs/README.md |
| SDK 4.1   | Alfresco 6.0.x / 6.1.x / 6.2.x | Alfresco 6.0.x / 6.1.x / 6.2.x | https://github.com/Alfresco/alfresco-sdk/tree/master/docs/README.md |
| SDK 4.0   | Alfresco 6.0.x / 6.1.x | Alfresco 6.0.x / 6.1.x | https://github.com/Alfresco/alfresco-sdk/blob/sdk-4.0/docs/README.md |
| SDK 3.1   | Alfresco 5.2.x | Alfresco 5.2.x | http://docs.alfresco.com/5.2/concepts/sdk-intro.html |
| SDK 3.0   | Alfresco 5.2.x | Alfresco 5.2.x | http://docs.alfresco.com/5.2/concepts/sdk-intro.html |
| SDK 2.2   | Alfresco 5.1.x | Alfresco 5.1.x | https://docs.alfresco.com/5.1/concepts/alfresco-sdk-intro.html |
@@ -38,8 +40,6 @@ To get started with **Alfresco SDK 4.0.x** (latest) visit the [Alfresco Document
| SDK 2.0   | Alfresco 5.0.0 | Alfresco 5.0.c | https://docs.alfresco.com/sdk2.0/concepts/alfresco-sdk-intro.html |
| SDK 1.1.1 | Alfresco 4.2.x | Alfresco 4.2.x | https://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-intro.html |



## Reporting Issues and Community Support
Report issues (and contribute!) [here](https://github.com/Alfresco/alfresco-sdk/issues?milestone=1&state=open) or join us on the [IRC Channel](http://chat.alfresco.com/).

+9 −9
Original line number Diff line number Diff line
---
Title: Alfresco SDK 4.0
Title: Alfresco SDK 4.1
Added: v3.0.0
Last reviewed: 2019-01-17
Last reviewed: 2019-10-18
---
# Alfresco SDK 4.0
# Alfresco SDK 4.1

Alfresco SDK 4.0 is a Maven based development kit that provides an easy to use approach to developing applications and extensions for Alfresco. With this 
Alfresco SDK 4.1 is a Maven based development kit that provides an easy to use approach to developing applications and extensions for Alfresco. With this 
SDK you can develop, package, test, run, document and release your Alfresco extension project.

For earlier releases of the Alfresco SDK, see the Previous versions section of [http://docs.alfresco.com](http://docs.alfresco.com).
For earlier releases of the Alfresco SDK, see the Previous versions of [http://docs.alfresco.com](http://docs.alfresco.com).

The Alfresco Software Development Kit (Alfresco SDK) is a fundamental tool provided by Alfresco to developers to build customizations and extensions for 
the Alfresco Digital Business Platform. It is based on [Apache Maven](http://maven.apache.org/) and [Docker](https://www.docker.com/) and is compatible with 
major IDEs. This enables Rapid Application Development (RAD) and Test Driven Development (TDD).

Alfresco SDK 4.0 is released under [Apache License version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) and supports Alfresco Content Services both 
Alfresco SDK 4.1 is released under [Apache License version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) and supports Alfresco Content Services both 
in Community Edition and Enterprise Edition. If you're an Enterprise customer, please check the [Alfresco SDK Support status](https://www.alfresco.com/alfresco-product-support-status) 
for the version you're using. If your version is in Limited or Full Support and you need help, contact our Support team [http://support.alfresco.com](http://support.alfresco.com/).

Alfresco SDK 4.0 is a major update to the SDK and provides several improvements on the previous releases.
Alfresco SDK 4.1 is a minor update to the SDK and provides support for Alfresco 6.2.x.

The 4.0 release takes advantage of Semantic Versioning ([SEMVER](http://semver.org/)), which means that this new release is not directly compatible with the 
previous releases of the SDK.

If you have existing projects that you wish to upgrade to SDK 4.0.x, the recommended approach is to generate a new project from our archetypes and move your 
If you have existing projects that you wish to upgrade to SDK 4.1.x, the recommended approach is to generate a new project from our archetypes and move your 
code into place.

## Documentation Content

* [What's new?](whats-new.md)
* [Getting started with Alfresco SDK 4.0](getting-started.md)
* [Getting started with Alfresco SDK 4.1](getting-started.md)
* [Alfresco SDK Maven archetypes](mvn-archetypes.md)
* [Working with generated projects](working-with-generated-projects/README.md)
    * [All-In-One project structure](working-with-generated-projects/structure-aio.md)
+2 −2
Original line number Diff line number Diff line
---
Title: Advanced topics
Added: v3.0.0
Last reviewed: 2019-01-17
Last reviewed: 2019-10-18
---
# Advanced topics

This information provides more advanced topics that you might come in contact with when you have been working with an SDK project for a while. We will have a 
look at how you can work with AMPs, remote debugging, hot reloading, and more.
look at how you can work with AMPs, remote debugging, hot reloading, enable transformations and more.
+96 −0
Original line number Diff line number Diff line
---
Title: How to set up Alfresco Transform Service (Community)
Added: v4.0.0
Last reviewed: 2019-10-18
---
# How to set up Alfresco Transform Service (Community)

By default, the _Alfresco Transform Service_ (from now ATS) is not included in the basic configuration of the projects generated making use of the Alfresco 
SDK archetypes. 

ATS is now supported in ACS Community and it is distributed as a composition of Docker containers. The docker images required for ATS are available in the 
Alfresco account at [Docker Hub](https://hub.docker.com/u/alfresco/).

In order to properly configure ATS in a project generated using the Alfresco SDK archetypes it is required to execute 2 steps:
1. Add the containers that conform ATS to the Docker compose file.
2. Configure the properties that are required to properly set up ATS.

## Adding the new containers

* Locate the Docker compose file (usually at `PROJECT_ROOT_PATH/docker/docker-compose.yml`) and add the containers that conform ATS (`alfresco-pdf-renderer`, 
`imagemagick`, `libreoffice`, `tika`, `transform-misc` and `activemq`):

```
services:
...
  alfresco-pdf-renderer:
    image: alfresco/alfresco-pdf-renderer:2.1.0-RC3
    environment:
      JAVA_OPTS: " -Xms256m -Xmx512m"
    ports:
      - 8090:8090
  imagemagick:
    image: alfresco/alfresco-imagemagick:2.1.0-RC3
    environment:
      JAVA_OPTS: " -Xms256m -Xmx512m"
    ports:
      - 8091:8090
  libreoffice:
    image: alfresco/alfresco-libreoffice:2.1.0-RC3
    environment:
      JAVA_OPTS: " -Xms256m -Xmx512m"
    ports:
      - 8092:8090
  tika:
    image: alfresco/alfresco-tika:2.1.0-RC3
    environment:
      JAVA_OPTS: " -Xms256m -Xmx512m"
    ports:
      - 8093:8090
  transform-misc:
    image: alfresco/alfresco-transform-misc:2.1.0-RC3
    environment:
      JAVA_OPTS: " -Xms256m -Xmx512m"
    ports:
      - 8094:8090    
  activemq:
    image: alfresco/alfresco-activemq:5.15.8
    ports:
      - 8161:8161 # Web Console
      - 5672:5672 # AMQP
      - 61616:61616 # OpenWire
      - 61613:61613 # STOMP
...
```

* Check that you haven't any port conflict with other services in the Docker compose file.

## Adding the required configuration

* Locate the _Alfresco global properties_ file for docker (usually at `PROJECT_ROOT_PATH/PROJECT_ARTIFACT_ID-platform-docker/src/main/docker/alfresco-global.properties`) 
and add the ATS configuration properties:

```
# Alfresco Transform Service
local.transform.service.enabled=true
localTransform.pdfrenderer.url=http://alfresco-pdf-renderer:8090/
localTransform.imagemagick.url=http://imagemagick:8090/
localTransform.libreoffice.url=http://libreoffice:8090/
localTransform.tika.url=http://tika:8090/
localTransform.misc.url=http://transform-misc:8090/

legacy.transform.service.enabled=true
alfresco-pdf-renderer.url=http://alfresco-pdf-renderer:8090/
jodconverter.url=http://libreoffice:8090/
img.url=http://imagemagick:8090/
tika.url=http://tika:8090/
transform.misc.url=http://transform-misc:8090/

messaging.broker.url=failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true
```

* Remove the old value of the properties: `messaging.broker.url`, `transform.service.enabled`, `local.transform.service.enabled` and 
`legacy.transform.service.enabled` in the same `alfresco-global.properties` file.

Once these 2 modifications are done, rebuild and restart all the services (`run.sh/run.bat build_start`) and ACS will use ATS to execute remote transformations 
asynchronously whenever possible.
+4 −4
Original line number Diff line number Diff line
---
Title: Working with AMPs
Added: v3.0.0
Last reviewed: 2019-01-14
Last reviewed: 2019-10-18
---
# Working with AMPs

Since the early days of the Alfresco SDK, the Alfresco Module Packages (AMP) have been the way customizations were packaged. In Alfresco SDK 4.0 everything 
Since the early days of the Alfresco SDK, the Alfresco Module Packages (AMP) have been the way customizations were packaged. In Alfresco SDK 4.1 everything 
is packaged as a JAR by default, while the AMPs are still available as an optional assembly. This gives you much more control over packaging, and simple 
modules can easily be deployed as JARs.

@@ -55,7 +55,7 @@ to your needs.

## Installing AMPs with the SDK

The projects created from the Alfresco SDK 4.0 archetypes are configured to deploy either JARs or AMPs to the ACS / Share docker container. The only thing to
The projects created from the Alfresco SDK 4.1 archetypes are configured to deploy either JARs or AMPs to the ACS / Share docker container. The only thing to
do is modify the `pom.xml` file of the corresponding docker module / project in order to properly configure the dependencies and the Maven dependency plugin.

### All-In-One project
@@ -172,7 +172,7 @@ Here is an example of how to install Florian Maul's Javascript Console.
## Controlling the order AMPs are applied

Under some specific circumstances it is necessary to apply different AMPs in a development project in a precise order. The default configuration of the 
projects generated using the Alfresco SDK 4.0 archetypes doesn't specify any concrete order applying the AMPs to the ACS/Share installation.
projects generated using the Alfresco SDK 4.1 archetypes doesn't specify any concrete order applying the AMPs to the ACS/Share installation.

Anyway, that order can be controlled modifying slightly the configuration of the custom Docker images in the project. For instance, let's say we have three
third party AMPs that we want to apply in the next order `third-party-amp-01.amp -> third-party-amp-02.amp -> third-party-amp-03.amp`. In this example, we're
Loading