Skip to content

Commit

Permalink
added support for APS 2.3.6 (#69), added remote debugging port (#36),…
Browse files Browse the repository at this point in the history
… commented jar deployment in tomcat/lib (#65), upgraded Maven plugins (#66)
  • Loading branch information
OpenPj committed Feb 10, 2023
1 parent 767aa7c commit 2f59157
Show file tree
Hide file tree
Showing 35 changed files with 227 additions and 103 deletions.
35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Alfresco Process Services SDK Project 2.1.9
# Alfresco Process Services SDK Project 2.2.0

The project consists of the following Maven submodules:

Expand All @@ -13,7 +13,7 @@ The project consists of the following Maven submodules:

# Prerequisites
* OpenJDK 11
* Apache Maven 3.8.7
* Apache Maven 3.9.0
* Docker (optional)
* Put valid _activiti.lic_ and _transform.lic_ (or _Aspose.Total.Java.lic_ ) in the `/license` folder for running unit / integration tests and for building containers
* Access to the Alfresco Nexus Repositories (credentials provided by Alfresco)
Expand Down Expand Up @@ -63,6 +63,32 @@ Full Maven lifecycle command deploying also the Activiti Admin app without rebui

* `mvn docker:stop -Pactiviti-admin`

## Remote Debugging

A debug port is available on port `5005` from the `aps-sdk/alfresco-process-services` container including the custom `activiti-app.war`.

Remember to eventually disable remote debugging for your production release commenting `CATALINA_OPTS` and `port` elements in the `/activiti-app-overlay-docker/pom.xml` as shown in the following snippets:

```xml
<run>
<env>
<!-- <CATALINA_OPTS>${catalina.opts.debug}</CATALINA_OPTS> -->
</env>
....
<ports>
<port>${docker.tomcat.port.external}:${docker.tomcat.port.internal}</port>
<!-- <port>${aps.debug.port}:${aps.debug.port}</port> -->
</ports>
```

Another good practice could be creating a separated Maven module with a `pom.xml` totally dedicatd to build your container for production release.

## Changing the default extensions deployment method
By default the APS SDK is deploying extensions as a unique JAR embedded in the `activiti-app.war`.
If you want to deploy your extensions in the `tomcat/lib` folder check out the following steps:

* Remove or comment the `aps-extensions-jar` dependency in the `/activiti-app-overlay-war/pom.xml`
* Uncomment the `COPY` command of the related Dockerfile from the folder: `/activiti-app-overlay-docker/src/main/docker`

# APS Extensions JAR Module

Expand Down Expand Up @@ -139,7 +165,8 @@ Put your Java test classes in the following package:
# Supported Maven Profiles for dependencies management and packaging (JAR, WAR and Docker containers)

In order to build the project, you can declare a Maven profile related to a specific APS version:
* `aps2.3.5` (APS 2.3.5 - default)
* `aps2.3.6` (APS 2.3.6 - default)
* `aps2.3.5` (APS 2.3.5)
* `aps2.3.4` (APS 2.3.4)
* `aps2.3.3` (APS 2.3.3)
* `aps2.3.2` (APS 2.3.2)
Expand All @@ -151,7 +178,7 @@ In order to build the project, you can declare a Maven profile related to a spec
* `aps2.0.1` (APS 2.0.1)
* `aps2.0.0` (APS 2.0.0)

Build and test with unit tests execution for APS 2.3.5 with:
Build and test with unit tests execution for APS 2.3.6 with:
`mvn clean test`

Build and test with unit tests execution for APS 2.3.1 with:
Expand Down
2 changes: 1 addition & 1 deletion activiti-app-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco.activiti</groupId>
<artifactId>aps-project</artifactId>
<version>2.1.9</version>
<version>2.2.0</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class FourEyesAppIT {
protected static final String BASE_PATH_HOSTNAME = "localhost";
protected static final int BASE_PATH_PORT = 8080;

protected static final String appZipFile = "aps-extensions-jar-2.1.9-App.zip";
protected static final String appZipFile = "aps-extensions-jar-2.2.0-App.zip";

protected static final String ACTIVITI_APP_BASE_PATH = BASE_PATH_PROTOCOL + "://" + BASE_PATH_HOSTNAME + ":"
+ BASE_PATH_PORT;
Expand Down
45 changes: 8 additions & 37 deletions activiti-app-overlay-docker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco.activiti</groupId>
<artifactId>aps-project</artifactId>
<version>2.1.9</version>
<version>2.2.0</version>
</parent>

<properties>
Expand Down Expand Up @@ -69,7 +69,7 @@
<build-activiti-admin-arm64.phase>pre-integration-test</build-activiti-admin-arm64.phase>

<aps.debug.port>5005</aps.debug.port>
<catalina.opts.debug>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${aps.debug.port}</catalina.opts.debug>
<catalina.opts.debug>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:${aps.debug.port}</catalina.opts.debug>
</properties>

<build>
Expand Down Expand Up @@ -226,7 +226,6 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<extensions>true</extensions>
<keepRunning>false</keepRunning>
<skip>false</skip>
<showLogs>true</showLogs>
Expand All @@ -251,6 +250,9 @@
</tags>
</build>
<run>
<env>
<CATALINA_OPTS>${catalina.opts.debug}</CATALINA_OPTS>
</env>
<network>
<name>aps-network</name>
<alias>aps-current-project</alias>
Expand Down Expand Up @@ -346,23 +348,6 @@
<driver>local</driver>
</volume>
</volumes>
<executions>
<execution>
<id>start-docker</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-docker</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -575,6 +560,9 @@
</build>

<run>
<env>
<CATALINA_OPTS>${catalina.opts.debug}</CATALINA_OPTS>
</env>
<network>
<name>aps-network</name>
<alias>aps-current-project</alias>
Expand Down Expand Up @@ -668,23 +656,6 @@
<driver>local</driver>
</volume>
</volumes>
<executions>
<execution>
<id>start-docker</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-docker</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USER root

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USER root

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USER root

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USER root

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USER root

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USER root

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USER root

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USER root

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USER root

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ USER root

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib
#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} logging/logback.xml $TOMCAT_DIR/lib

Expand Down
Loading

0 comments on commit 2f59157

Please sign in to comment.